3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class toStr { private $str; public function __construct( $str ) { $this->str = $str; } public function __toString() { return $this->str; } } function strictly( string $str ) { return $str; } strictly( new toStr('hi'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gU06F
function name:  (null)
number of ops:  7
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  20     0  E >   INIT_FCALL                                               'strictly'
         1        NEW                                              $0      :8
         2        SEND_VAL_EX                                              'hi'
         3        DO_FCALL                                      0          
         4        SEND_VAR                                                 $0
         5        DO_FCALL                                      0          
         6      > RETURN                                                   1

Function strictly:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gU06F
function name:  strictly
number of ops:  3
compiled vars:  !0 = $str
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  16     0  E >   RECV                                             !0      
  17     1      > RETURN                                                   !0
  18     2*     > RETURN                                                   null

End of function strictly

Class toStr:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gU06F
function name:  __construct
number of ops:  4
compiled vars:  !0 = $str
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   RECV                                             !0      
   8     1        ASSIGN_SUB                                    0          'str'
         2        OP_DATA                                                  !0
   9     3      > RETURN                                                   null

End of function __construct

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

End of function __tostring

End of class toStr.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
13.36 ms | 411 KiB | 7 Q