3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v = 50.1; var_dump(preg_replace('/(E[+-])(\d)$/', '\${1}0$2', sprintf('%1.2E',$v)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4VtdE
function name:  (null)
number of ops:  14
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 50.1
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%28E%5B%2B-%5D%29%28%5Cd%29%24%2F'
          4        SEND_VAL                                                 '%5C%24%7B1%7D0%242'
          5        INIT_FCALL                                               'sprintf'
          6        SEND_VAL                                                 '%251.2E'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.27 ms | 1394 KiB | 19 Q