3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { const PRODUCTION = 20; public static $environment = 10; } setlocale(LC_ALL, 'tr_TR.UTF-8'); test::$environment = constant('test::'.strtoupper('production')); echo (test::$environment);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A6RUr
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 6
          2        SEND_VAL                                                 'tr_TR.UTF-8'
          3        DO_ICALL                                                 
    8     4        INIT_FCALL                                               'constant'
          5        INIT_FCALL                                               'strtoupper'
          6        SEND_VAL                                                 'production'
          7        DO_ICALL                                         $2      
          8        CONCAT                                           ~3      'test%3A%3A', $2
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                         $4      
         11        ASSIGN_STATIC_PROP                                       'environment', 'test'
         12        OP_DATA                                                  $4
    9    13        FETCH_STATIC_PROP_R          unknown             ~5      'environment'
         14        ECHO                                                     ~5
         15      > RETURN                                                   1

Class test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.62 ms | 1394 KiB | 19 Q