3v4l.org

run code in 300+ PHP versions simultaneously
<?php class beers { const softdrink = 'rootbeer'; public static $ale = 'ipa'; } $rootbeer = 'A & W'; $ipa = 'Alexander Keith\'s'; // Ceci fonctionne ; Affiche : I'd like an A & W echo "I'd like an {${beers::softdrink}}\n"; // Ceci fonctionne également ; Affiche : I'd like an Alexander Keith's echo "I'd like an {beers::$ale}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ioDda
function name:  (null)
number of ops:  12
compiled vars:  !0 = $rootbeer, !1 = $ipa, !2 = $ale
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'A+%26+W'
   11     1        ASSIGN                                                   !1, 'Alexander+Keith%27s'
   14     2        ROPE_INIT                                     3  ~7      'I%27d+like+an+'
          3        FETCH_R                      local               ~5      'rootbeer'
          4        ROPE_ADD                                      1  ~7      ~7, ~5
          5        ROPE_END                                      2  ~6      ~7, '%0A'
          6        ECHO                                                     ~6
   17     7        ROPE_INIT                                     3  ~10     'I%27d+like+an+%7Bbeers%3A%3A'
          8        ROPE_ADD                                      1  ~10     ~10, !2
          9        ROPE_END                                      2  ~9      ~10, '%7D%0A'
         10        ECHO                                                     ~9
         11      > RETURN                                                   1

Class beers: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.96 ms | 1393 KiB | 13 Q