3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public function Baz($uri) { $uri = parse_url($uri); array_walk( $uri, function($value, $name) { $this->$component = $value; } ); } } $bar = new Bar(); $bar->Baz('http://foo.bar/test?q=v'); var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Grslh
function name:  (null)
number of ops:  10
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'Baz'
          4        SEND_VAL_EX                                              'http%3A%2F%2Ffoo.bar%2Ftest%3Fq%3Dv'
          5        DO_FCALL                                      0          
   17     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FGrslh%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Grslh
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $value, !1 = $name, !2 = $component
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_THIS                                       $3      
          3        ASSIGN_OBJ                                               $3, !2
          4        OP_DATA                                                  !0
          5      > RETURN                                                   null

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

Class Bar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Grslh
function name:  Baz
number of ops:  11
compiled vars:  !0 = $uri
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    7     5        INIT_FCALL                                               'array_walk'
    8     6        SEND_REF                                                 !0
    9     7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGrslh%3A9%240'
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                                 
   11    10      > RETURN                                                   null

End of function baz

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.66 ms | 1396 KiB | 19 Q