3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 0; $addone = function() use ($count) { $count ++; }; echo $count . "<br>"; $addone(); $addone(); echo $count. "<br>"; $addonefix = function() use (&$count) { $count ++; }; echo $count. "<br>"; $addonefix(); $addonefix(); echo $count. "<br>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2tbLt
function name:  (null)
number of ops:  24
compiled vars:  !0 = $count, !1 = $addone, !2 = $addonefix
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    4     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2tbLt%3A4%240'
          2        BIND_LEXICAL                                             ~4, !0
          3        ASSIGN                                                   !1, ~4
   10     4        CONCAT                                           ~6      !0, '%3Cbr%3E'
          5        ECHO                                                     ~6
   11     6        INIT_DYNAMIC_CALL                                        !1
          7        DO_FCALL                                      0          
   12     8        INIT_DYNAMIC_CALL                                        !1
          9        DO_FCALL                                      0          
   13    10        CONCAT                                           ~9      !0, '%3Cbr%3E'
         11        ECHO                                                     ~9
   15    12        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2tbLt%3A15%241'
         13        BIND_LEXICAL                                             ~10, !0
         14        ASSIGN                                                   !2, ~10
   20    15        CONCAT                                           ~12     !0, '%3Cbr%3E'
         16        ECHO                                                     ~12
   21    17        INIT_DYNAMIC_CALL                                        !2
         18        DO_FCALL                                      0          
   22    19        INIT_DYNAMIC_CALL                                        !2
         20        DO_FCALL                                      0          
   23    21        CONCAT                                           ~15     !0, '%3Cbr%3E'
         22        ECHO                                                     ~15
         23      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F2tbLt%3A4%240

Function %00%7Bclosure%7D%2Fin%2F2tbLt%3A15%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2tbLt
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   BIND_STATIC                                              !0
   17     1        PRE_INC                                                  !0
   18     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2tbLt%3A15%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.88 ms | 1395 KiB | 13 Q