3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ns01 { class cl01 { const ONE1 = 1 +1; const ONE2 = 34 - 34; const ONE3 = true; const ONE4 = 1 % 1; const ONE5 = !true; const ONE6 = ~ 1; const ONE7 = 1 | 1; const ONE8 = 1 & 1; const ONE9 = 1 ^ 1; const ONE10 = 1 << 1; const ONE11 = 1 >> 1; const ONE12 = 1 . 1; const ONE13 = 1 ?: 1; const ONE14 = 1 <= 1; const ONE15 = array(); const ONE16 = 1 == 1; const ONE17 = 1 != 1; const ONE18 = 1 < 1; const ONE19 = 1 > 1; const ONE20 = 1 === 1; const ONE21 = 1 !== 1; const ONE22 = 1 && 1; const ONE23 = 1 || 1; const ONE24 = 1 xor 1; } } namespace ns02 { class cl02 { const TWO = \ns01\cl01::ONE; function test($tmp = self::TWO + 1) { return 1 + !\ns01\cl01::ONE; } } $tmp = new cl02(); $tmp->test(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JF49f
function name:  (null)
number of ops:  6
compiled vars:  !0 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   NEW                                              $1      'ns02%5Ccl02'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   45     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   46     5      > RETURN                                                   1

Class ns01\cl01: [no user functions]
Class ns02\cl02:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JF49f
function name:  test
number of ops:  6
compiled vars:  !0 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   RECV_INIT                                        !0      <const ast>
   40     1        FETCH_CLASS_CONSTANT                             ~1      'ns01%5Ccl01', 'ONE'
          2        BOOL_NOT                                         ~2      ~1
          3        ADD                                              ~3      1, ~2
          4      > RETURN                                                   ~3
   41     5*     > RETURN                                                   null

End of function test

End of class ns02\cl02.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.11 ms | 1393 KiB | 13 Q