3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class Group { private $number = 20; public function __toString() { return "$this->number"; } } $number = new Group(); echo ++ $number, PHP_EOL; $number = 20; echo ++ $number, PHP_EOL; // var_dump(new Group() === "20"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1TndI
function name:  (null)
number of ops:  15
compiled vars:  !0 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    2     3        DECLARE_CLASS                                            'group'
   10     4        NEW                                              $2      'Group'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   11     7        PRE_INC                                          ~5      !0
          8        ECHO                                                     ~5
          9        ECHO                                                     '%0A'
   13    10        ASSIGN                                                   !0, 20
   14    11        PRE_INC                                          ~7      !0
         12        ECHO                                                     ~7
         13        ECHO                                                     '%0A'
   18    14      > RETURN                                                   1

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

End of function __tostring

End of class Group.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.9 ms | 1395 KiB | 15 Q