3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('precision', 100); $foo = (float) (PHP_INT_MAX ); $foo *= 2; 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 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/s74Rg
function name:  (null)
number of ops:  27
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        CAST                                          5  ~4      9223372036854775807
          5        ASSIGN                                                   !0, ~4
    5     6        ASSIGN_OP                                     3          !0, 2
    7     7        IS_EQUAL                                                 !0, 1.84467e+19
          8      > JMPZ                                                     ~7, ->11
    8     9    >   ECHO                                                     'true'
         10      > JMP                                                      ->26
   11    11    >   ASSIGN                                                   !1, '1.844674407371E%2B19'
   12    12        NOP                                                      
         13        FAST_CONCAT                                      ~9      !0, '+%21%3D+'
         14        CONCAT                                           ~10     ~9, !1
         15        CONCAT                                           ~11     ~10, '%0A'
         16        ECHO                                                     ~11
   14    17        CAST                                          6  ~12     !0
         18        ASSIGN                                                   !2, ~12
   16    19        INIT_FCALL                                               'strcmp'
         20        SEND_VAR                                                 !1
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $14     
         23        IS_IDENTICAL                                             $14, 0
         24      > JMPZ                                                     ~15, ->26
   17    25    >   ECHO                                                     'String+representation+is+the+same.'
   20    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.52 ms | 1396 KiB | 17 Q