3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a; } class B extends A { public $b; } $a = new B(); $a->a = 0; $a->b = 1; $b = new B(); $b->a = 1; $b->b = 0; var_dump($a < $b); print_r($a, true); var_dump($a < $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2figq
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
          3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  0
          5        ASSIGN_OBJ                                               !0, 'b'
          6        OP_DATA                                                  1
    6     7        NEW                                              $7      'B'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
         10        ASSIGN_OBJ                                               !1, 'a'
         11        OP_DATA                                                  1
         12        ASSIGN_OBJ                                               !1, 'b'
         13        OP_DATA                                                  0
    7    14        INIT_FCALL                                               'var_dump'
         15        IS_SMALLER                                       ~12     !0, !1
         16        SEND_VAL                                                 ~12
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                                 
    9    22        INIT_FCALL                                               'var_dump'
         23        IS_SMALLER                                       ~15     !0, !1
         24        SEND_VAL                                                 ~15
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.33 ms | 1411 KiB | 17 Q