3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar; class Bar {} namespace Foo\Baz; use Foo\Bar; class Baz { public function __construct(){ $str1 = "Bar"; $str2 = "\\Foo\\Bar"; $a = new Bar; var_dump($a); $b = new $str1; var_dump($b); $c = new $str2; var_dump($c); } } $baz = new Baz();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ss0U
function name:  (null)
number of ops:  4
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Foo%5CBaz%5CBaz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class Foo\Bar\Bar: [no user functions]
Class Foo\Baz\Baz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ss0U
function name:  __construct
number of ops:  23
compiled vars:  !0 = $str1, !1 = $str2, !2 = $a, !3 = $b, !4 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 'Bar'
   13     1        ASSIGN                                                   !1, '%5CFoo%5CBar'
   15     2        NEW                                              $7      'Foo%5CBar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $7
          5        INIT_NS_FCALL_BY_NAME                                    'Foo%5CBaz%5Cvar_dump'
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0          
   16     8        FETCH_CLASS                                   0  $11     !0
          9        NEW                                              $12     $11
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $12
         12        INIT_NS_FCALL_BY_NAME                                    'Foo%5CBaz%5Cvar_dump'
         13        SEND_VAR_EX                                              !3
         14        DO_FCALL                                      0          
   17    15        FETCH_CLASS                                   0  $16     !1
         16        NEW                                              $17     $16
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !4, $17
         19        INIT_NS_FCALL_BY_NAME                                    'Foo%5CBaz%5Cvar_dump'
         20        SEND_VAR_EX                                              !4
         21        DO_FCALL                                      0          
   18    22      > RETURN                                                   null

End of function __construct

End of class Foo\Baz\Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.86 ms | 1396 KiB | 15 Q