3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { function __toString() { return "124"; } } function test() { return new test; } print "123" . test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pS8cu
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'test'
   13     1        INIT_FCALL                                               'test'
          2        DO_FCALL                                      0  $0      
          3        CONCAT                                           ~1      '123', $0
          4        ECHO                                                     ~1
          5      > RETURN                                                   1

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

End of function test

Class test:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pS8cu
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   '124'
    6     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.41 ms | 1397 KiB | 14 Q