3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($x) { var_dump($x); return $x('gehr') === 'true'; } $v = foo(function($p){return 'true';}); var_dump($v);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WminX
function name:  (null)
number of ops:  9
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'foo'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWminX%3A9%240'
          2        SEND_VAL                                                 ~1
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
   10     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WminX
function name:  foo
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4        INIT_DYNAMIC_CALL                                        !0
          5        SEND_VAL_EX                                              'gehr'
          6        DO_FCALL                                      0  $2      
          7        IS_IDENTICAL                                     ~3      $2, 'true'
          8      > RETURN                                                   ~3
    7     9*     > RETURN                                                   null

End of function foo

Function %00%7Bclosure%7D%2Fin%2FWminX%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WminX
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1      > RETURN                                                   'true'
          2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWminX%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.69 ms | 1398 KiB | 16 Q