3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { const PRODUCTION = 20; public static $environment = 10; } 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/7Rcn9
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'constant'
          1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAL                                                 'production'
          3        DO_ICALL                                         $1      
          4        CONCAT                                           ~2      'test%3A%3A', $1
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        ASSIGN_STATIC_PROP                                       'environment', 'test'
          8        OP_DATA                                                  $3
    8     9        FETCH_STATIC_PROP_R          unknown             ~4      'environment'
         10        ECHO                                                     ~4
         11      > RETURN                                                   1

Class test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.91 ms | 1394 KiB | 17 Q