3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 23; $sum = array_sum(str_split(sprintf('%d', $number))); var_dump($sum);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/capQX
function name:  (null)
number of ops:  16
compiled vars:  !0 = $number, !1 = $sum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 23
    5     1        INIT_FCALL                                               'array_sum'
          2        INIT_FCALL                                               'str_split'
          3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 '%25d'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !1, $5
    6    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.4 ms | 1398 KiB | 21 Q