3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = array("/cash-equivalents_quarterly/" , "/total-assets_quarterly/"); $replace_data["cash-equivalents_quarterly"] = 169677928570; $replace_data["total-assets_quarterly"] = 222617965672000000000; $formula["1"] = " cash-equivalents_quarterly / total-assets_quarterly"; $amount1 = preg_replace($pattern,$replace_data,$formula["1"]); var_dump($amount1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n4qDK
function name:  (null)
number of ops:  18
compiled vars:  !0 = $pattern, !1 = $replace_data, !2 = $formula, !3 = $amount1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN_DIM                                               !1, 'cash-equivalents_quarterly'
          2        OP_DATA                                                  169677928570
    6     3        ASSIGN_DIM                                               !1, 'total-assets_quarterly'
          4        OP_DATA                                                  2.22618e+20
    8     5        ASSIGN_DIM                                               !2, 1
          6        OP_DATA                                                  '+cash-equivalents_quarterly+%2F+total-assets_quarterly'
   10     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        FETCH_DIM_R                                      ~8      !2, 1
         11        SEND_VAL                                                 ~8
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !3, $9
   11    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
238.72 ms | 998 KiB | 15 Q