3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('precision', 100); $foo = (PHP_INT_MAX ); $foo *= 2; var_dump($foo); var_dump($foo); if ($foo == 1.844674407371E+19) { echo "true"; } else { $expectedString = "1.844674407371E+19"; echo "$foo != ".$expectedString.PHP_EOL; $fooAsString = (string)$foo; if (strcmp($expectedString, $fooAsString) === 0) { echo "String representation is the same."; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/t1irb
function name:  (null)
number of ops:  32
compiled vars:  !0 = $foo, !1 = $expectedString, !2 = $fooAsString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'precision'
          2        SEND_VAL                                                 100
          3        DO_ICALL                                                 
    3     4        ASSIGN                                                   !0, 9223372036854775807
    5     5        ASSIGN_OP                                     3          !0, 2
    6     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
    9    12        IS_EQUAL                                                 !0, 1.84467e+19
         13      > JMPZ                                                     ~8, ->16
   10    14    >   ECHO                                                     'true'
         15      > JMP                                                      ->31
   13    16    >   ASSIGN                                                   !1, '1.844674407371E%2B19'
   14    17        NOP                                                      
         18        FAST_CONCAT                                      ~10     !0, '+%21%3D+'
         19        CONCAT                                           ~11     ~10, !1
         20        CONCAT                                           ~12     ~11, '%0A'
         21        ECHO                                                     ~12
   16    22        CAST                                          6  ~13     !0
         23        ASSIGN                                                   !2, ~13
   18    24        INIT_FCALL                                               'strcmp'
         25        SEND_VAR                                                 !1
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $15     
         28        IS_IDENTICAL                                             $15, 0
         29      > JMPZ                                                     ~16, ->31
   19    30    >   ECHO                                                     'String+representation+is+the+same.'
   22    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.81 ms | 1396 KiB | 19 Q