3v4l.org

run code in 300+ PHP versions simultaneously
<?php $int = 'intruder'; define('con', '"smart"'); // Use a closure (anomynous function) like so: $_ = function ($val){return $val;}; $doc = <<<TXT Hi there, One day I caught this $int nearby. I was then told that actually other {$_(con)} $int was there before. So who came first, the chicken or the egg? TXT; echo $doc;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hYTrW
function name:  (null)
number of ops:  21
compiled vars:  !0 = $int, !1 = $_, !2 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'intruder'
    4     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'con'
          3        SEND_VAL                                                 '%22smart%22'
          4        DO_ICALL                                                 
    6     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FhYTrW%3A6%240'
          6        ASSIGN                                                   !1, ~5
    8     7        ROPE_INIT                                     7  ~10     'Hi+there%2C%0AOne+day+I+caught+this+'
    9     8        ROPE_ADD                                      1  ~10     ~10, !0
          9        ROPE_ADD                                      2  ~10     ~10, '+nearby.%0AI+was+then+told+that+actually+other+'
   10    10        INIT_DYNAMIC_CALL                                        !1
         11        FETCH_CONSTANT                                   ~7      'con'
         12        SEND_VAL_EX                                              ~7
         13        DO_FCALL                                      0  $8      
         14        ROPE_ADD                                      3  ~10     ~10, $8
         15        ROPE_ADD                                      4  ~10     ~10, '+'
         16        ROPE_ADD                                      5  ~10     ~10, !0
         17        ROPE_END                                      6  ~9      ~10, '+was+there+before.%0ASo+who+came+first%2C+the+chicken+or+the+egg%3F'
    7    18        ASSIGN                                                   !2, ~9
   13    19        ECHO                                                     !2
   14    20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FhYTrW%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hYTrW
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1      > RETURN                                                   !0
          2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FhYTrW%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170 ms | 1395 KiB | 15 Q