3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait ExampleTrait { public function test() { $me = static::class; // OK $not_me = static::class . 'IsAwesome'; // OK $day_me = static::class . date('Ymd'); // OK $array_me = [static::class]; // BOOM } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CpKdA
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   1

Class ExampleTrait:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CpKdA
function name:  test
number of ops:  15
compiled vars:  !0 = $me, !1 = $not_me, !2 = $day_me, !3 = $array_me
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_CLASS_NAME                                 ~4      
          1        ASSIGN                                                   !0, ~4
    8     2        FETCH_CLASS_NAME                                 ~6      
          3        CONCAT                                           ~7      ~6, 'IsAwesome'
          4        ASSIGN                                                   !1, ~7
    9     5        FETCH_CLASS_NAME                                 ~9      
          6        INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'Ymd'
          8        DO_ICALL                                         $10     
          9        CONCAT                                           ~11     ~9, $10
         10        ASSIGN                                                   !2, ~11
   10    11        FETCH_CLASS_NAME                                 ~13     
         12        INIT_ARRAY                                       ~14     ~13
         13        ASSIGN                                                   !3, ~14
   11    14      > RETURN                                                   null

End of function test

End of class ExampleTrait.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.9 ms | 1426 KiB | 14 Q