3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(method_exists(new StdClass, '__toString')); var_dump(method_exists("waa", '__toString')); var_dump(method_exists(array(), '__toString')); var_dump(method_exists(1.337, '__toString')); class A { public function __call($a, $args) { echo $a; } } $a = new A; echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fv7e3
function name:  (null)
number of ops:  35
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'method_exists'
          2        NEW                                              $1      'StdClass'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $1
          5        SEND_VAL                                                 '__toString'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
    4     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'method_exists'
         11        SEND_VAL                                                 'waa'
         12        SEND_VAL                                                 '__toString'
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
    5    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'method_exists'
         18        SEND_VAL                                                 <array>
         19        SEND_VAL                                                 '__toString'
         20        DO_ICALL                                         $7      
         21        SEND_VAR                                                 $7
         22        DO_ICALL                                                 
    6    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'method_exists'
         25        SEND_VAL                                                 1.337
         26        SEND_VAL                                                 '__toString'
         27        DO_ICALL                                         $9      
         28        SEND_VAR                                                 $9
         29        DO_ICALL                                                 
   15    30        NEW                                              $11     'A'
         31        DO_FCALL                                      0          
         32        ASSIGN                                                   !0, $11
   16    33        ECHO                                                     !0
         34      > RETURN                                                   1

Class A:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fv7e3
function name:  __call
number of ops:  4
compiled vars:  !0 = $a, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ECHO                                                     !0
   12     3      > RETURN                                                   null

End of function __call

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.22 ms | 1396 KiB | 17 Q