3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=0); error_reporting(0); function foo(int $int): void { echo "[{$int}]"; } try { foo(1_0); foo('2_0'); } catch (TypeError) { echo 'TypeError'; }
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: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DduJJ
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
    9     3        INIT_FCALL                                               'foo'
          4        SEND_VAL                                                 10
          5        DO_FCALL                                      0          
   10     6        INIT_FCALL                                               'foo'
          7        SEND_VAL                                                 '2_0'
          8        DO_FCALL                                      0          
          9      > JMP                                                      ->12
   11    10  E > > CATCH                                       last         'TypeError'
   12    11    >   ECHO                                                     'TypeError'
   13    12    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DduJJ
function name:  foo
number of ops:  6
compiled vars:  !0 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ROPE_INIT                                     3  ~2      '%5B'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%5D'
          4        ECHO                                                     ~1
    7     5      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.63 ms | 1402 KiB | 17 Q