3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Path { public $currentPath; private $array; function __construct($path) { $this->currentPath = $path; $array = explode("/", $path); print_r($array); } public function cd($newPath) { throw new Exception('Not implemented'); } } $path = new Path('/a/b/c/d');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oUZGl
function name:  (null)
number of ops:  5
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Path'
          1        SEND_VAL_EX                                              '%2Fa%2Fb%2Fc%2Fd'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class Path:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oUZGl
function name:  __construct
number of ops:  12
compiled vars:  !0 = $path, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'currentPath'
          2        OP_DATA                                                  !0
   10     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%2F'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !1, $3
   11     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   13    11      > RETURN                                                   null

End of function __construct

Function cd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/oUZGl
function name:  cd
number of ops:  6
compiled vars:  !0 = $newPath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'Not+implemented'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
   18     5*     > RETURN                                                   null

End of function cd

End of class Path.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.79 ms | 1396 KiB | 17 Q