3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locales = [ 'american', 'american english', 'american-english', 'australian', 'belgian', 'canadian', 'chinese', 'chinese-simplified', 'chinese-traditional', 'chs', 'cht', 'csy', 'czech', 'dan', 'danish', 'dea', 'des', 'deu', 'dutch', 'dutch-belgian', 'ell', 'ena', 'enc', 'eng', 'english', 'english-american', 'english-aus', 'english-can', 'english-nz', 'english-uk', 'english-us', 'english-usa', 'enu', 'enz', 'esm', 'esn', 'esp', 'fin', 'finnish', 'fra', 'frb', 'frc', 'french', 'french-belgian', 'french-canadian', 'french-swiss', 'frs', 'german', 'german-austrian', 'german-swiss', 'greek', 'hun', 'hungarian', 'icelandic', 'isl', 'ita', 'italian', 'italian-swiss', 'its', 'japanese', 'jpn', 'kor', 'korean', 'nlb', 'nld', 'non', 'nor', 'norwegian', 'norwegian-bokmal', 'norwegian-nynorsk', 'plk', 'polish', 'portuguese', 'portuguese-brazilian', 'ptb', 'ptg', 'rus', 'russian', 'sky', 'slovak', 'spanish', 'spanish-mexican', 'spanish-modern', 'sve', 'swedish', 'swiss', 'trk', 'turkish', 'uk', 'us', 'usa' ]; $numbers = [20 / 3 * 1e6, 6.66, 6.0]; foreach ($locales as $locale) { $res = setlocale(LC_NUMERIC, $locale); var_dump($res); foreach ($numbers as $number) { echo $number, "\n"; echo json_decode($number), "\n"; } echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 25
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 25
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 22
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/dHS2D
function name:  (null)
number of ops:  27
compiled vars:  !0 = $locales, !1 = $numbers, !2 = $locale, !3 = $res, !4 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, <array>
   17     2      > FE_RESET_R                                       $7      !0, ->25
          3    > > FE_FETCH_R                                               $7, !2, ->25
   18     4    >   INIT_FCALL                                               'setlocale'
          5        SEND_VAL                                                 1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !3, $8
   19     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                                 
   21    12      > FE_RESET_R                                       $11     !1, ->22
         13    > > FE_FETCH_R                                               $11, !4, ->22
   22    14    >   ECHO                                                     !4
         15        ECHO                                                     '%0A'
   23    16        INIT_FCALL                                               'json_decode'
         17        SEND_VAR                                                 !4
         18        DO_ICALL                                         $12     
         19        ECHO                                                     $12
         20        ECHO                                                     '%0A'
   21    21      > JMP                                                      ->13
         22    >   FE_FREE                                                  $11
   26    23        ECHO                                                     '%0A'
   17    24      > JMP                                                      ->3
         25    >   FE_FREE                                                  $7
   27    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.48 ms | 1396 KiB | 19 Q