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'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QDOGp
function name:  (null)
number of ops:  31
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'method_exists'
          2        NEW                                              $0      'StdClass'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $0
          5        SEND_VAL                                                 '__toString'
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          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                                         $4      
         14        SEND_VAR                                                 $4
         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                                         $6      
         21        SEND_VAR                                                 $6
         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                                         $8      
         28        SEND_VAR                                                 $8
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.13 ms | 1395 KiB | 17 Q