3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pergi($dari, $ke, $callback){ echo "Saya pergi dari {$dari} menuju ke {$ke}."; if(is_callable($callback)){ $callback(); } } $a = function(){ echo ' Saya mau pulang kampung dulu'; }; pergi('Jakarta', 'Comal', $a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4BL4s
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4BL4s%3A9%240'
          1        ASSIGN                                                   !0, ~1
   13     2        INIT_FCALL                                               'pergi'
          3        SEND_VAL                                                 'Jakarta'
          4        SEND_VAL                                                 'Comal'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function pergi:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/4BL4s
function name:  pergi
number of ops:  16
compiled vars:  !0 = $dari, !1 = $ke, !2 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    3     3        ROPE_INIT                                     5  ~4      'Saya+pergi+dari+'
          4        ROPE_ADD                                      1  ~4      ~4, !0
          5        ROPE_ADD                                      2  ~4      ~4, '+menuju+ke+'
          6        ROPE_ADD                                      3  ~4      ~4, !1
          7        ROPE_END                                      4  ~3      ~4, '.'
          8        ECHO                                                     ~3
    4     9        INIT_FCALL                                               'is_callable'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $7      
         12      > JMPZ                                                     $7, ->15
    5    13    >   INIT_DYNAMIC_CALL                                        !2
         14        DO_FCALL                                      0          
    7    15    > > RETURN                                                   null

End of function pergi

Function %00%7Bclosure%7D%2Fin%2F4BL4s%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4BL4s
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     '+Saya+mau+pulang+kampung+dulu'
   11     1      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.6 ms | 1399 KiB | 16 Q