3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formula = '[ (((-594 - 0) )/ 55032411) *244 ]'; $pos = strpos($formula, "-"); $part = str_replace(array("(",")","["," "), array("","","",""),substr($formula, 0, $pos)); If($part ==""){ $formula = substr($formula, 0,$pos) ."0". substr($formula, $pos); } Echo $formula;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 31
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/TaSjr
function name:  (null)
number of ops:  33
compiled vars:  !0 = $formula, !1 = $pos, !2 = $part
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B+%28%28%28-594+-+0%29+%29%2F+55032411%29+%2A244+%5D'
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '-'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        INIT_FCALL                                               'str_replace'
          7        SEND_VAL                                                 <array>
          8        SEND_VAL                                                 <array>
          9        INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 0
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !2, $7
    7    17        IS_EQUAL                                                 !2, ''
         18      > JMPZ                                                     ~9, ->31
    8    19    >   INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 0
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $10     
         24        CONCAT                                           ~11     $10, '0'
         25        INIT_FCALL                                               'substr'
         26        SEND_VAR                                                 !0
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $12     
         29        CONCAT                                           ~13     ~11, $12
         30        ASSIGN                                                   !0, ~13
   11    31    >   ECHO                                                     !0
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.11 ms | 1013 KiB | 16 Q