3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.67 ms | 1396 KiB | 19 Q