3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "Php,Arrays,Mysql"; function backwards($input) { $str = $input; $revStr = array(); $str = explode(",", $str); for ($x = 0; $x < count($str); $x++) { array_push($revStr, strrev($str[$x])); } return implode(',', $revStr); } $result =backwards($string); echo $result; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KIhRb
function name:  (null)
number of ops:  7
compiled vars:  !0 = $string, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Php%2CArrays%2CMysql'
   16     1        INIT_FCALL                                                   'backwards'
          2        SEND_VAR                                                     !0
          3        DO_FCALL                                          0  $3      
          4        ASSIGN                                                       !1, $3
   18     5        ECHO                                                         !1
   20     6      > RETURN                                                       1

Function backwards:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 10
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 10
Branch analysis from position: 22
Branch analysis from position: 10
filename:       /in/KIhRb
function name:  backwards
number of ops:  25
compiled vars:  !0 = $input, !1 = $str, !2 = $revStr, !3 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        ASSIGN                                                       !1, !0
    8     2        ASSIGN                                                       !2, <array>
    9     3        INIT_FCALL                                                   'explode'
          4        SEND_VAL                                                     '%2C'
          5        SEND_VAR                                                     !1
          6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !1, $6
   10     8        ASSIGN                                                       !3, 0
          9      > JMP                                                          ->19
   11    10    >   INIT_FCALL                                                   'array_push'
         11        SEND_REF                                                     !2
         12        INIT_FCALL                                                   'strrev'
         13        FETCH_DIM_R                                          ~9      !1, !3
         14        SEND_VAL                                                     ~9
         15        DO_ICALL                                             $10     
         16        SEND_VAR                                                     $10
         17        DO_ICALL                                                     
   10    18        PRE_INC                                                      !3
         19    >   COUNT                                                ~13     !1
         20        IS_SMALLER                                                   !3, ~13
         21      > JMPNZ                                                        ~14, ->10
   13    22    >   FRAMELESS_ICALL_2                implode             ~15     '%2C', !2
         23      > RETURN                                                       ~15
   14    24*     > RETURN                                                       null

End of function backwards

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
199.39 ms | 2257 KiB | 17 Q