问答详情
源自:3-7 PHP标量类型—整型

运行成功输出错误

<?php

$data_int1=123;

echo $data_int1;

echo "<br />";

$date_int2=-123;

echo $data_int2;

echo "<br />";

$date_int3=0123;

echo $data_int3;

echo "<br />";

$date_int4=0x123;

echo $data_int4;

echo "<br />";

?>


提问者:陈______ 2020-08-13 10:56

个回答

  • 苏飏
    2021-09-13 21:36:01

    5,8,11行!

    正确为:data

    错误为:date

  • 陈______
    2020-08-13 16:09:47

    我哪里错了吗,为什么啊

  • 慕无忌7589087
    2020-08-13 12:21:34

    <?php

    $data_int1 = 123;

    echo $data_int1;

    echo "<br />";

    $data_int2 = -123;

    echo $data_int2;

    echo "<br />";

    $data_int3 = 0123;

    echo $data_int3;

    echo "<br />";

    $data_int4 = 0x123;

    echo $data_int4;

    echo "<br />";

    ?>