3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(bar $a = null, $b) { } $r = new ReflectionParameter('foo', 0); try { $r->getClass(); } catch (\Exception $e) { echo $e->getMessage(); } var_dump($r->isNullAllowed());
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: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uTJ1O
function name:  (null)
number of ops:  18
compiled vars:  !0 = $r, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'ReflectionParameter'
          1        SEND_VAL_EX                                              'foo'
          2        SEND_VAL_EX                                              0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   10     5        INIT_METHOD_CALL                                         !0, 'getClass'
          6        DO_FCALL                                      0          
          7      > JMP                                                      ->12
   11     8  E > > CATCH                                       last         'Exception'
   12     9    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         10        DO_FCALL                                      0  $6      
         11        ECHO                                                     $6
   15    12    >   INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !0, 'isNullAllowed'
         14        DO_FCALL                                      0  $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uTJ1O
function name:  foo
number of ops:  3
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
          1        RECV                                             !1      
    5     2      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.1 ms | 1399 KiB | 16 Q