3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(token_get_all("$a = 'x'; a($a); function a($a){ debug_zval_dump($a);//refcount=4 why not 3? }"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0oEnp
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'token_get_all'
          2        ROPE_INIT                                     8  ~2      !0
          3        ROPE_ADD                                      1  ~2      ~2, '+%3D+%27x%27%3B%0Aa%28'
    3     4        ROPE_ADD                                      2  ~2      ~2, !0
          5        ROPE_ADD                                      3  ~2      ~2, '%29%3B%0Afunction+a%28'
    4     6        ROPE_ADD                                      4  ~2      ~2, !0
          7        ROPE_ADD                                      5  ~2      ~2, '%29%7B%0A++++debug_zval_dump%28'
    5     8        ROPE_ADD                                      6  ~2      ~2, !0
          9        ROPE_END                                      7  ~1      ~2, '%29%3B%2F%2Frefcount%3D4+why+not+3%3F%0A%7D'
         10        SEND_VAL                                                 ~1
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
    6    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
199 ms | 1394 KiB | 17 Q