3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait Eq { abstract public function equiv(Eq $lhs, Eq $rhs): bool; } class Number { use Eq; public function __construct(public int $value) {} public function equiv(int $lhs, int $rhs): bool { return $lhs === $rhs; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2T5dP
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                                'number'
   15     1      > RETURN                                                       1

Class Eq:
Function equiv:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2T5dP
function name:  equiv
number of ops:  4
compiled vars:  !0 = $lhs, !1 = $rhs
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        VERIFY_RETURN_TYPE                                           
          3      > RETURN                                                       null

End of function equiv

End of class Eq.

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

End of function __construct

Function equiv:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2T5dP
function name:  equiv
number of ops:  7
compiled vars:  !0 = $lhs, !1 = $rhs
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   13     2        IS_IDENTICAL                                         ~2      !0, !1
          3        VERIFY_RETURN_TYPE                                           ~2
          4      > RETURN                                                       ~2
   14     5*       VERIFY_RETURN_TYPE                                           
          6*     > RETURN                                                       null

End of function equiv

End of class Number.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
182.4 ms | 1782 KiB | 13 Q