3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$test = array( 'permissions2', 'this2', 'test'); //$toost = array('permissions2', 'test', 'this2'); //$yo = array_diff($toost, $test); //if (array_diff($toost, $test) || array_diff($test, $toost)) // echo 'false'; //else // echo 'true'; class A { public static function who() { echo __CLASS__; } public static function test() { static::who(); } } class B extends A { public static function who() { echo __CLASS__; } } B::test(); B::who();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aEuX
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'test'
          1        DO_FCALL                                      0          
   29     2        INIT_STATIC_METHOD_CALL                                  'B', 'who'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class A:
Function who:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aEuX
function name:  who
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'A'
   16     1      > RETURN                                                   null

End of function who

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aEuX
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'who'
          1        DO_FCALL                                      0          
   19     2      > RETURN                                                   null

End of function test

End of class A.

Class B:
Function who:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aEuX
function name:  who
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ECHO                                                     'B'
   25     1      > RETURN                                                   null

End of function who

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aEuX
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  'who'
          1        DO_FCALL                                      0          
   19     2      > RETURN                                                   null

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.97 ms | 1395 KiB | 13 Q