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){ $mySentence = json_encode($sameArray); $mySentence = preg_replace('/a/', 'b', $mySentence); $otherArray = json_decode($mySentence); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VLYKf
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
   38    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/VLYKf
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/VLYKf
function name:  __construct
number of ops:  14
compiled vars:  !0 = $myArray, !1 = $myProcessClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        ECHO                                                     'Printing+my+Array+as+Recieved'
   22     2        ECHO                                                     '%3C%2Fbr%3E'
   23     3        INIT_FCALL                                               'print_r'
          4        INIT_FCALL                                               'array_values'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
   25     9        NEW                                              $4      'myProcess'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $4
   26    13      > 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/VLYKf
function name:  __construct
number of ops:  16
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                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   34     5        INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%2Fa%2F'
          7        SEND_VAL                                                 'b'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
   35    11        INIT_FCALL                                               'json_decode'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !2, $7
   36    15      > RETURN                                                   null

End of function __construct

End of class myProcess.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.44 ms | 1400 KiB | 23 Q