3v4l.org

run code in 300+ PHP versions simultaneously
<?php $argv[1] = '24601.283'; list($a,$b)=explode('.',strrev($argv[1])); $f = function($s) { $i=1; foreach(str_split($s) as $n) { $t[] = str_pad($n, $i++, '0'); } return array_reverse($t); }; echo implode('+',array_merge($f($b),$f($a)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t4I7X
function name:  (null)
number of ops:  33
compiled vars:  !0 = $argv, !1 = $a, !2 = $b, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 1
          1        OP_DATA                                                  '24601.283'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '.'
          4        INIT_FCALL                                               'strrev'
          5        FETCH_DIM_R                                      ~5      !0, 1
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                         $7      
         10        FETCH_LIST_R                                     $8      $7, 0
         11        ASSIGN                                                   !1, $8
         12        FETCH_LIST_R                                     $10     $7, 1
         13        ASSIGN                                                   !2, $10
         14        FREE                                                     $7
    6    15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Ft4I7X%3A6%240'
         16        ASSIGN                                                   !3, ~12
   14    17        INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '%2B'
         19        INIT_FCALL                                               'array_merge'
         20        INIT_DYNAMIC_CALL                                        !3
         21        SEND_VAR_EX                                              !2
         22        DO_FCALL                                      0  $14     
         23        SEND_VAR                                                 $14
         24        INIT_DYNAMIC_CALL                                        !3
         25        SEND_VAR_EX                                              !1
         26        DO_FCALL                                      0  $15     
         27        SEND_VAR                                                 $15
         28        DO_ICALL                                         $16     
         29        SEND_VAR                                                 $16
         30        DO_ICALL                                         $17     
         31        ECHO                                                     $17
         32      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Ft4I7X%3A6%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/t4I7X
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $s, !1 = $i, !2 = $n, !3 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !1, 1
    8     2        INIT_FCALL                                               'str_split'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5      > FE_RESET_R                                       $6      $5, ->16
          6    > > FE_FETCH_R                                               $6, !2, ->16
    9     7    >   INIT_FCALL                                               'str_pad'
          8        SEND_VAR                                                 !2
          9        POST_INC                                         ~8      !1
         10        SEND_VAL                                                 ~8
         11        SEND_VAL                                                 '0'
         12        DO_ICALL                                         $9      
         13        ASSIGN_DIM                                               !3
         14        OP_DATA                                                  $9
    8    15      > JMP                                                      ->6
         16    >   FE_FREE                                                  $6
   11    17        INIT_FCALL                                               'array_reverse'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                         $10     
         20      > RETURN                                                   $10
   12    21*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Ft4I7X%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.81 ms | 945 KiB | 28 Q