3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('X', 500); define('Y', 5E2); define('Z', (int) 5E2); class MyClass { const A = 500; const B = 5E2; const C = 200 + 300; } var_dump(gettype(MyClass::A)); var_dump(gettype(MyClass::B)); var_dump(gettype(MyClass::C));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hlb4j
function name:  (null)
number of ops:  26
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'X'
          2        SEND_VAL                                                 500
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'Y'
          6        SEND_VAL                                                 500
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'Z'
         10        CAST                                          4  ~2      500
         11        SEND_VAL                                                 ~2
         12        DO_ICALL                                                 
   12    13        INIT_FCALL                                               'var_dump'
         14        GET_TYPE                                         ~4      500
         15        SEND_VAL                                                 ~4
         16        DO_ICALL                                                 
   13    17        INIT_FCALL                                               'var_dump'
         18        GET_TYPE                                         ~6      500
         19        SEND_VAL                                                 ~6
         20        DO_ICALL                                                 
   14    21        INIT_FCALL                                               'var_dump'
         22        GET_TYPE                                         ~8      500
         23        SEND_VAL                                                 ~8
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.79 ms | 1386 KiB | 17 Q