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 ($objFirst == $objSecond); print_r($objFirst); var_dump ($objFirst == $objSecond);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TJWQR
function name:  (null)
number of ops:  20
compiled vars:  !0 = $objFirst, !1 = $objSecond
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  19     0  E >   NEW                                              $2      :35
         1        SEND_VAL_EX                                              '123'
         2        DO_FCALL                                      0          
         3        QM_ASSIGN                                                !0
  20     4        NEW                                              $5      :30
         5        SEND_VAL_EX                                              '321'
         6        DO_FCALL                                      0          
         7        QM_ASSIGN                                                !1
  22     8        INIT_FCALL                                               'var_dump'
         9        IS_NOT_EQUAL                                     ~8      !0, !1
        10        SEND_VAL                                                 ~8
        11        DO_ICALL                                                 
  23    12        INIT_FCALL                                               'print_r'
        13        SEND_VAR                                                 !0
        14        DO_ICALL                                                 
  24    15        INIT_FCALL                                               'var_dump'
        16        IS_NOT_EQUAL                                     ~11     !0, !1
        17        SEND_VAL                                                 ~11
        18        DO_ICALL                                                 
        19      > 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/TJWQR
function name:  __construct
number of ops:  4
compiled vars:  !0 = $someValue
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  13     0  E >   RECV                                             !0      
  15     1        ASSIGN_SUB                                    0          'someValue'
         2        OP_DATA                                                  !0
  16     3      > RETURN                                                   null

End of function __construct

End of class second.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
11.92 ms | 411 KiB | 7 Q