3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ( class_exists( 'closure' ) ) { $example = function () { echo 'SAFE'; }; $example(); } else { echo 'NOPE'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qutlJ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $example
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'closure'
          2        DO_ICALL                                         $1      
          3      > JMPZ                                                     $1, ->9
    3     4    >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          5        ASSIGN                                                   !0, ~2
    6     6        INIT_DYNAMIC_CALL                                        !0
          7        DO_FCALL                                      0          
    2     8      > JMP                                                      ->10
    8     9    >   ECHO                                                     'NOPE'
    9    10    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qutlJ
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'SAFE'
    5     1      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.27 ms | 1444 KiB | 14 Q