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; for ($i = 0; $i < 11; ++$i) 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 = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
Branch analysis from position: 10
filename:       /in/3fNJP
function name:  (null)
number of ops:  21
compiled vars:  !0 = $count, !1 = $decrease_count, !2 = $added_records, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 10
    4     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F3fNJP%3A4%240'
          2        BIND_LEXICAL                                             ~5, !0
          3        ASSIGN                                                   !1, ~5
    7     4        INIT_DYNAMIC_CALL                                        !1
          5        DO_FCALL                                      0          
    8     6        ECHO                                                     !0
   10     7        ASSIGN                                                   !2, 0
   11     8        ASSIGN                                                   !3, 0
          9      > JMP                                                      ->15
   12    10    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F3fNJP%3A12%241'
         11        BIND_LEXICAL                                             ~10, !2
   15    12        INIT_USER_CALL                                0          'call_user_func', ~10
         13        DO_FCALL                                      0          
   11    14        PRE_INC                                                  !3
         15    >   IS_SMALLER                                               !3, 11
         16      > JMPNZ                                                    ~13, ->10
   16    17    >   CONCAT                                           ~14     '%3Ch2%3EAdded+', !2
         18        CONCAT                                           ~15     ~14, '+records%3C%2Fh2%3E'
         19        ECHO                                                     ~15
         20      > RETURN                                                   1

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

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

End of function %00%7Bclosure%7D%2Fin%2F3fNJP%3A12%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.1 ms | 1399 KiB | 13 Q