3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Mediator{function t($e,$a){foreach($this->l[$e]as$l)call_user_func($l,$a);}function a($e,$l,$p){$s=&$this->l;do$p.='a';while(isset($s[$p]));$s[$e][$p]=$l;ksort($s,1);}} $e = new Mediator(); $e->a('hello',function($name){echo 'hello '.$name;},0); $e->t('hello','World');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GIj36
function name:  (null)
number of ops:  14
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $1      'Mediator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    6     3        INIT_METHOD_CALL                                         !0, 'a'
          4        SEND_VAL_EX                                              'hello'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGIj36%3A6%240'
          6        SEND_VAL_EX                                              ~4
          7        SEND_VAL_EX                                              0
          8        DO_FCALL                                      0          
    7     9        INIT_METHOD_CALL                                         !0, 't'
         10        SEND_VAL_EX                                              'hello'
         11        SEND_VAL_EX                                              'World'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FGIj36%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GIj36
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        CONCAT                                           ~1      'hello+', !0
          2        ECHO                                                     ~1
          3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FGIj36%3A6%240

Class Mediator:
Function t:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/GIj36
function name:  t
number of ops:  12
compiled vars:  !0 = $e, !1 = $a, !2 = $l
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_OBJ_R                                      ~3      'l'
          3        FETCH_DIM_R                                      ~4      ~3, !0
          4      > FE_RESET_R                                       $5      ~4, ->10
          5    > > FE_FETCH_R                                               $5, !2, ->10
          6    >   INIT_USER_CALL                                1          'call_user_func', !2
          7        SEND_USER                                                !1
          8        DO_FCALL                                      0          
          9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $5
         11      > RETURN                                                   null

End of function t

Function a:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 5
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/GIj36
function name:  a
number of ops:  16
compiled vars:  !0 = $e, !1 = $l, !2 = $p, !3 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        FETCH_OBJ_W                                      $4      'l'
          4        ASSIGN_REF                                               !3, $4
          5    >   ASSIGN_OP                                     8          !2, 'a'
          6        ISSET_ISEMPTY_DIM_OBJ                         0          !3, !2
          7      > JMPNZ                                                    ~7, ->5
          8    >   FETCH_DIM_W                                      $8      !3, !0
          9        ASSIGN_DIM                                               $8, !2
         10        OP_DATA                                                  !1
         11        INIT_FCALL                                               'ksort'
         12        SEND_REF                                                 !3
         13        SEND_VAL                                                 1
         14        DO_ICALL                                                 
         15      > RETURN                                                   null

End of function a

End of class Mediator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.47 ms | 1400 KiB | 15 Q