3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CarPartsTransferObject { public $engine; public $carFrame; function __construct($engine, $carFrame) { $this->engine= $engine; $this->carFrame = $carFrame; } } function getCarParts() { return new CarPartsTransferObject('V8', 'Blue Ford Car Frame'); } $carParts = getCarParts(); echo $carParts->engine, PHP_EOL; echo $carParts->carFrame;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8l8gd
function name:  (null)
number of ops:  9
compiled vars:  !0 = $carParts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'getcarparts'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   17     3        FETCH_OBJ_R                                      ~3      !0, 'engine'
          4        ECHO                                                     ~3
          5        ECHO                                                     '%0A'
   18     6        FETCH_OBJ_R                                      ~4      !0, 'carFrame'
          7        ECHO                                                     ~4
          8      > RETURN                                                   1

Function getcarparts:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8l8gd
function name:  getCarParts
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'CarPartsTransferObject'
          1        SEND_VAL_EX                                              'V8'
          2        SEND_VAL_EX                                              'Blue+Ford+Car+Frame'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $0
   14     5*     > RETURN                                                   null

End of function getcarparts

Class CarPartsTransferObject:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8l8gd
function name:  __construct
number of ops:  7
compiled vars:  !0 = $engine, !1 = $carFrame
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        ASSIGN_OBJ                                               'engine'
          3        OP_DATA                                                  !0
    8     4        ASSIGN_OBJ                                               'carFrame'
          5        OP_DATA                                                  !1
    9     6      > RETURN                                                   null

End of function __construct

End of class CarPartsTransferObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.7 ms | 1399 KiB | 14 Q