3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "4141.58-3878.96-262.62"; $nums = explode("-",$str); $op1 = $nums[0] - $nums[1] - $nums[2]; var_dump($op1); $bc = bcsub((float)$nums[0],(float)$nums[1],(float)$nums[2]); var_dump($bc);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/53egd
function name:  (null)
number of ops:  31
compiled vars:  !0 = $str, !1 = $nums, !2 = $op1, !3 = $bc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '4141.58-3878.96-262.62'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '-'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        FETCH_DIM_R                                      ~7      !1, 0
          7        FETCH_DIM_R                                      ~8      !1, 1
          8        SUB                                              ~9      ~7, ~8
          9        FETCH_DIM_R                                      ~10     !1, 2
         10        SUB                                              ~11     ~9, ~10
         11        ASSIGN                                                   !2, ~11
    6    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
    8    15        INIT_FCALL_BY_NAME                                       'bcsub'
         16        FETCH_DIM_R                                      ~14     !1, 0
         17        CAST                                          5  ~15     ~14
         18        SEND_VAL_EX                                              ~15
         19        FETCH_DIM_R                                      ~16     !1, 1
         20        CAST                                          5  ~17     ~16
         21        SEND_VAL_EX                                              ~17
         22        FETCH_DIM_R                                      ~18     !1, 2
         23        CAST                                          5  ~19     ~18
         24        SEND_VAL_EX                                              ~19
         25        DO_FCALL                                      0  $20     
         26        ASSIGN                                                   !3, $20
    9    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
214.7 ms | 1399 KiB | 17 Q