3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class first { protected $someArray = array(); } class second extends first { protected $someArray = array(); protected $someValue = null; public function __construct($someValue) { $this->someValue = $someValue; } } $objFirst = new second('123'); $objSecond = new second('321'); var_dump($object1 == $object2); print_r($object1); print_r($object2); var_dump($object1 == $object2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D5M35
function name:  (null)
number of ops:  23
compiled vars:  !0 = $objFirst, !1 = $objSecond, !2 = $object1, !3 = $object2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $4      'second'
          1        SEND_VAL_EX                                              '123'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
   26     4        NEW                                              $7      'second'
          5        SEND_VAL_EX                                              '321'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
   29     8        INIT_FCALL                                               'var_dump'
          9        IS_EQUAL                                         ~10     !2, !3
         10        SEND_VAL                                                 ~10
         11        DO_ICALL                                                 
   31    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   33    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   35    18        INIT_FCALL                                               'var_dump'
         19        IS_EQUAL                                         ~14     !2, !3
         20        SEND_VAL                                                 ~14
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Class first: [no user functions]
Class second:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D5M35
function name:  __construct
number of ops:  4
compiled vars:  !0 = $someValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        ASSIGN_OBJ                                               'someValue'
          2        OP_DATA                                                  !0
   21     3      > RETURN                                                   null

End of function __construct

End of class second.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.36 ms | 1396 KiB | 17 Q