3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); function f($s){for($i=-($l=strlen($s));$i<$l;$I=abs(++$i)){$t=substr($s,$I);echo str_repeat(' ',$I).strrev($t).substr($t,1)."\n";}} echo "------------\n"; f(" desserts"); echo "------------\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Vvkm
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
    6     3        ECHO                                                     '------------%0A'
    7     4        INIT_FCALL                                               'f'
          5        SEND_VAL                                                 '+desserts'
          6        DO_FCALL                                      0          
    8     7        ECHO                                                     '------------%0A'
          8      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 6
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 6
Branch analysis from position: 33
Branch analysis from position: 6
filename:       /in/9Vvkm
function name:  f
number of ops:  34
compiled vars:  !0 = $s, !1 = $i, !2 = $l, !3 = $t, !4 = $I
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        STRLEN                                           ~5      !0
          2        ASSIGN                                           ~6      !2, ~5
          3        MUL                                              ~7      ~6, -1
          4        ASSIGN                                                   !1, ~7
          5      > JMP                                                      ->31
          6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !4
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !3, $9
         11        INIT_FCALL                                               'str_repeat'
         12        SEND_VAL                                                 '+'
         13        SEND_VAR                                                 !4
         14        DO_ICALL                                         $11     
         15        INIT_FCALL                                               'strrev'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $12     
         18        CONCAT                                           ~13     $11, $12
         19        INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !3
         21        SEND_VAL                                                 1
         22        DO_ICALL                                         $14     
         23        CONCAT                                           ~15     ~13, $14
         24        CONCAT                                           ~16     ~15, '%0A'
         25        ECHO                                                     ~16
         26        INIT_FCALL                                               'abs'
         27        PRE_INC                                          ~17     !1
         28        SEND_VAL                                                 ~17
         29        DO_ICALL                                         $18     
         30        ASSIGN                                                   !4, $18
         31    >   IS_SMALLER                                               !1, !2
         32      > JMPNZ                                                    ~20, ->6
         33    > > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.84 ms | 1403 KiB | 24 Q