3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C{static function __callStatic($n,$p){static$_;return($f=&$_[$n])?$f():$f=$p[0];}} C::now(function(){ return new DateTime(); }); var_dump(C::now());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OqSpm
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_STATIC_METHOD_CALL                                  'C', 'now'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOqSpm%3A4%240'
    6     2        SEND_VAL_EX                                              ~0
          3        DO_FCALL                                      0          
    7     4        INIT_FCALL                                               'var_dump'
          5        INIT_STATIC_METHOD_CALL                                  'C', 'now'
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOqSpm%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OqSpm
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'DateTime'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    6     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FOqSpm%3A4%240

Class C:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OqSpm
function name:  __callStatic
number of ops:  15
compiled vars:  !0 = $n, !1 = $p, !2 = $_, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        FETCH_DIM_W                                      $4      !2, !0
          4        ASSIGN_REF                                       $5      !3, $4
          5      > JMPZ                                                     $5, ->10
          6    >   INIT_DYNAMIC_CALL                                        !3
          7        DO_FCALL                                      0  $6      
          8        QM_ASSIGN                                        ~7      $6
          9      > JMP                                                      ->13
         10    >   FETCH_DIM_R                                      ~8      !1, 0
         11        ASSIGN                                           ~9      !3, ~8
         12        QM_ASSIGN                                        ~7      ~9
         13    > > RETURN                                                   ~7
         14*     > RETURN                                                   null

End of function __callstatic

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.64 ms | 1396 KiB | 15 Q