3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myArrayContainer{ function myArrayFunction(){ return $myArray = array( "Name" => "John", "LastName" => "Smith", ); } } $myShitz = new myArrayContainer(); $myShit = $myShitz->myArrayFunction(); $myShitClass = new myArrayClass($myShit); class myArrayClass { function __construct($myArray){ // echo ("Printing my Array as Recieved"); // echo ("</br>"); // print_r(array_values($myArray)); $myProcessClass = new myProcess($myArray); } } class myProcess { function __construct($sameArray){ print_r($sameArray); $mySentence = json_encode($sameArray); $mySentence = preg_replace('/a/', 'b', $mySentence); $otherArray = json_decode($mySentence); print_r($otherArray); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRlvt
function name:  (null)
number of ops:  11
compiled vars:  !0 = $myShitz, !1 = $myShit, !2 = $myShitClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'myArrayContainer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   15     3        INIT_METHOD_CALL                                         !0, 'myArrayFunction'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
   16     6        NEW                                              $8      'myArrayClass'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $8
   40    10      > RETURN                                                   1

Class myArrayContainer:
Function myarrayfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRlvt
function name:  myArrayFunction
number of ops:  3
compiled vars:  !0 = $myArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                           ~1      !0, <array>
          1      > RETURN                                                   ~1
   10     2*     > RETURN                                                   null

End of function myarrayfunction

End of class myArrayContainer.

Class myArrayClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRlvt
function name:  __construct
number of ops:  6
compiled vars:  !0 = $myArray, !1 = $myProcessClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   25     1        NEW                                              $2      'myProcess'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $2
   26     5      > RETURN                                                   null

End of function __construct

End of class myArrayClass.

Class myProcess:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRlvt
function name:  __construct
number of ops:  22
compiled vars:  !0 = $sameArray, !1 = $mySentence, !2 = $otherArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   33     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   34     4        INIT_FCALL                                               'json_encode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
   35     8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAL                                                 '%2Fa%2F'
         10        SEND_VAL                                                 'b'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !1, $6
   36    14        INIT_FCALL                                               'json_decode'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $8      
         17        ASSIGN                                                   !2, $8
   37    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   38    21      > RETURN                                                   null

End of function __construct

End of class myProcess.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.07 ms | 1400 KiB | 21 Q