3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.32 ms | 1396 KiB | 19 Q