3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$formatter = new NumberFormatter('en_RU', NumberFormatter::CURRENCY); //echo $formatter->formatCurrency(10.25, 'RSD'); $parts = explode('.', 'din.10'); $parts[0] = preg_replace("/\D*/", "", $parts[0]); $parts[1] = (1 == count($parts)) ? 0 : preg_replace("/\D*/", "", $parts[1]); var_dump(doubleval($parts[0].".".$parts[1]));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jDBVo
function name:  (null)
number of ops:  36
compiled vars:  !0 = $parts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '.'
          2        SEND_VAL                                                 'din.10'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%2F%5CD%2A%2F'
          7        SEND_VAL                                                 ''
          8        FETCH_DIM_R                                      ~4      !0, 0
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                         $5      
         11        ASSIGN_DIM                                               !0, 0
         12        OP_DATA                                                  $5
    6    13        COUNT                                            ~7      !0
         14        IS_EQUAL                                                 ~7, 1
         15      > JMPZ                                                     ~8, ->18
         16    >   QM_ASSIGN                                        ~9      0
         17      > JMP                                                      ->25
         18    >   INIT_FCALL                                               'preg_replace'
         19        SEND_VAL                                                 '%2F%5CD%2A%2F'
         20        SEND_VAL                                                 ''
         21        FETCH_DIM_R                                      ~10     !0, 1
         22        SEND_VAL                                                 ~10
         23        DO_ICALL                                         $11     
         24        QM_ASSIGN                                        ~9      $11
         25    >   ASSIGN_DIM                                               !0, 1
         26        OP_DATA                                                  ~9
    7    27        INIT_FCALL                                               'var_dump'
         28        FETCH_DIM_R                                      ~12     !0, 0
         29        CONCAT                                           ~13     ~12, '.'
         30        FETCH_DIM_R                                      ~14     !0, 1
         31        CONCAT                                           ~15     ~13, ~14
         32        CAST                                          5  ~16     ~15
         33        SEND_VAL                                                 ~16
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.78 ms | 1396 KiB | 19 Q