3v4l.org

run code in 300+ PHP versions simultaneously
<?php function countFromAndTo($from, $to) { for ($counter = $from; $counter <= $to; $counter = $counter +1) { print $counter . ', '; } } print "Josh: "; countFromAndTo(5, 26).PHP_EOL; print "Armando: "; countFromAndTo(27, 38).PHP_EOL; print "Juan: "; countFromAndTo(-15,3).PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YYq3n
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'Josh%3A+'
   11     1        INIT_FCALL                                               'countfromandto'
          2        SEND_VAL                                                 5
          3        SEND_VAL                                                 26
          4        DO_FCALL                                      0  $0      
          5        CONCAT                                           ~1      $0, '%0A'
          6        FREE                                                     ~1
   12     7        ECHO                                                     'Armando%3A+'
   13     8        INIT_FCALL                                               'countfromandto'
          9        SEND_VAL                                                 27
         10        SEND_VAL                                                 38
         11        DO_FCALL                                      0  $2      
         12        CONCAT                                           ~3      $2, '%0A'
         13        FREE                                                     ~3
   14    14        ECHO                                                     'Juan%3A+'
   15    15        INIT_FCALL                                               'countfromandto'
         16        SEND_VAL                                                 -15
         17        SEND_VAL                                                 3
         18        DO_FCALL                                      0  $4      
         19        CONCAT                                           ~5      $4, '%0A'
         20        FREE                                                     ~5
         21      > RETURN                                                   1

Function countfromandto:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
filename:       /in/YYq3n
function name:  countFromAndTo
number of ops:  11
compiled vars:  !0 = $from, !1 = $to, !2 = $counter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, !0
          3      > JMP                                                      ->8
    6     4    >   CONCAT                                           ~4      !2, '%2C+'
          5        ECHO                                                     ~4
    5     6        ADD                                              ~5      !2, 1
          7        ASSIGN                                                   !2, ~5
          8    >   IS_SMALLER_OR_EQUAL                                      !2, !1
          9      > JMPNZ                                                    ~7, ->4
    8    10    > > RETURN                                                   null

End of function countfromandto

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.77 ms | 1399 KiB | 16 Q