3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function foo(int $x): void { echo 'This is fine:', $x, PHP_EOL; } // Good foo(12345); // Bad try { foo(3.1415); } catch (TypeError $ex) { echo $ex->getMessage(), PHP_EOL; } // Also bad, apparently! foo(PHP_INT_MAX + (PHP_INT_MAX >> 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bmLu5
function name:  (null)
number of ops:  16
compiled vars:  !0 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 12345
          2        DO_FCALL                                      0          
   13     3        INIT_FCALL                                               'foo'
          4        SEND_VAL                                                 3.1415
          5        DO_FCALL                                      0          
          6      > JMP                                                      ->12
   14     7  E > > CATCH                                       last         'TypeError'
   15     8    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          9        DO_FCALL                                      0  $3      
         10        ECHO                                                     $3
         11        ECHO                                                     '%0A'
   19    12    >   INIT_FCALL                                               'foo'
         13        SEND_VAL                                                 1.38351e+19
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bmLu5
function name:  foo
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ECHO                                                     'This+is+fine%3A'
          2        ECHO                                                     !0
          3        ECHO                                                     '%0A'
    6     4      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.83 ms | 1389 KiB | 16 Q