3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.16 ms | 1396 KiB | 19 Q