3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 10; $decrease_count = function() use (&$count) { $count--; }; $decrease_count(); echo $count; $added_records = 0; call_user_func(function() use (&$added_records) { $added_records++; echo "ADDED RECORDS LOCAL: " . $added_records . "<br>"; }); echo "<h2>Added " . $added_records . " records</h2>";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v72pf
function name:  (null)
number of ops:  16
compiled vars:  !0 = $count, !1 = $decrease_count, !2 = $added_records
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 10
    4     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fv72pf%3A4%240'
          2        BIND_LEXICAL                                             ~4, !0
          3        ASSIGN                                                   !1, ~4
    7     4        INIT_DYNAMIC_CALL                                        !1
          5        DO_FCALL                                      0          
    8     6        ECHO                                                     !0
   10     7        ASSIGN                                                   !2, 0
   11     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fv72pf%3A11%241'
          9        BIND_LEXICAL                                             ~8, !2
   14    10        INIT_USER_CALL                                0          'call_user_func', ~8
         11        DO_FCALL                                      0          
   15    12        CONCAT                                           ~10     '%3Ch2%3EAdded+', !2
         13        CONCAT                                           ~11     ~10, '+records%3C%2Fh2%3E'
         14        ECHO                                                     ~11
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fv72pf%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v72pf
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
    5     1        PRE_DEC                                                  !0
    6     2      > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2Fv72pf%3A11%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v72pf
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $added_records
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   BIND_STATIC                                              !0
   12     1        PRE_INC                                                  !0
   13     2        CONCAT                                           ~2      'ADDED+RECORDS+LOCAL%3A+', !0
          3        CONCAT                                           ~3      ~2, '%3Cbr%3E'
          4        ECHO                                                     ~3
   14     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fv72pf%3A11%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.94 ms | 1395 KiB | 13 Q