3v4l.org

run code in 300+ PHP versions simultaneously
<?php class my { public function __toString() { return __CLASS__; } } var_dump(strlen(1.1), strlen(1), strlen(new my), strlen(null));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7AKP1
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'my'
    8     1        INIT_FCALL                                               'var_dump'
          2        STRLEN                                           ~0      1.1
          3        SEND_VAL                                                 ~0
    9     4        STRLEN                                           ~1      1
          5        SEND_VAL                                                 ~1
   10     6        NEW                                              $2      'my'
          7        DO_FCALL                                      0          
          8        STRLEN                                           ~4      $2
          9        SEND_VAL                                                 ~4
   11    10        STRLEN                                           ~5      null
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function __tostring

End of class my.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.31 ms | 1395 KiB | 15 Q