3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(class_exists("TestClass")); //false class TestClass implements JsonSerializable { function __construct() { var_dump(__METHOD__); } public function jsonSerialize() { return null; } } var_dump(class_exists("TestClass")); //true
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcfMs
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'class_exists'
          2        SEND_VAL                                                 'TestClass'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    3     6        DECLARE_CLASS                                            'testclass'
   14     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'class_exists'
          9        SEND_VAL                                                 'TestClass'
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class TestClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcfMs
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'TestClass%3A%3A__construct'
          2        DO_ICALL                                                 
    7     3      > RETURN                                                   null

End of function __construct

Function jsonserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcfMs
function name:  jsonSerialize
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null
   11     1*     > RETURN                                                   null

End of function jsonserialize

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.57 ms | 1395 KiB | 17 Q