3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { protected $errors = array(); protected $value = null; public function __construct($value) { $this->value = $value; } } $object1 = new B('ABC'); $object2 = new B('CBA'); 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/hs5nH
function name:  (null)
number of ops:  23
compiled vars:  !0 = $object1, !1 = $object2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $2      'B'
          1        SEND_VAL_EX                                              'ABC'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   21     4        NEW                                              $5      'B'
          5        SEND_VAL_EX                                              'CBA'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   24     8        INIT_FCALL                                               'var_dump'
          9        IS_EQUAL                                         ~8      !0, !1
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                                 
   26    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
   28    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   30    18        INIT_FCALL                                               'var_dump'
         19        IS_EQUAL                                         ~12     !0, !1
         20        SEND_VAL                                                 ~12
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hs5nH
function name:  __construct
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        ASSIGN_OBJ                                               'value'
          2        OP_DATA                                                  !0
   16     3      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
202.23 ms | 1395 KiB | 17 Q