3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace php { class test { public function __construct() { echo "cool"; } } class RussianРусский { public function __construct() { echo "Unicode :("; } } } namespace { $obj = new \Php\test(); // ok $obj = new \php\tEst(); // ok $obj = new \Php\RussianРусский(); // ok $obj = new \Php\RussianРуССкий(); // WTF, unicode... }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ia0pc
function name:  (null)
number of ops:  13
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Php%5Ctest'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        NEW                                              $4      'php%5CtEst'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   19     6        NEW                                              $7      'Php%5CRussian%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $7
   20     9        NEW                                              $10     'Php%5CRussian%D0%A0%D1%83%D0%A1%D0%A1%D0%BA%D0%B8%D0%B9'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !0, $10
   21    12      > RETURN                                                   1

Class php\test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ia0pc
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'cool'
    6     1      > RETURN                                                   null

End of function __construct

End of class php\test.

Class php\RussianРусский:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ia0pc
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'Unicode+%3A%28'
   12     1      > RETURN                                                   null

End of function __construct

End of class php\RussianРусский.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.13 ms | 1394 KiB | 13 Q