3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "4141.58-3878.96-262.52"; $nums = explode("-",$str); $op1 = $nums[0] - $nums[1] - $nums[2]; var_dump($op1); $bc = bcsub((float)$nums[0],(float)$nums[1]); $bc = bcsub($bc,(float)$nums[2]); var_dump($bc);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndPjT
function name:  (null)
number of ops:  35
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.52'
    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        DO_FCALL                                      0  $18     
         23        ASSIGN                                                   !3, $18
    9    24        INIT_FCALL_BY_NAME                                       'bcsub'
         25        SEND_VAR_EX                                              !3
         26        FETCH_DIM_R                                      ~20     !1, 2
         27        CAST                                          5  ~21     ~20
         28        SEND_VAL_EX                                              ~21
         29        DO_FCALL                                      0  $22     
         30        ASSIGN                                                   !3, $22
   10    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.23 ms | 1396 KiB | 20 Q