3v4l.org

run code in 300+ PHP versions simultaneously
<?php function assertValidLocale($locale) { if ($locale === null || 1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) { throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale)); } } var_dump(assertValidLocale(null));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rOoVF
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'assertvalidlocale'
          2        SEND_VAL                                                 null
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function assertvalidlocale:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/rOoVF
function name:  assertValidLocale
number of ops:  19
compiled vars:  !0 = $locale
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        TYPE_CHECK                                    2  ~1      !0
          2      > JMPNZ_EX                                         ~1      ~1, ->9
          3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5E%5Ba-z0-9%40_%5C.%5C-%5D%2A%24%2Fi'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        IS_NOT_IDENTICAL                                 ~3      $2, 1
          8        BOOL                                             ~1      ~3
          9    > > JMPZ                                                     ~1, ->18
    9    10    >   NEW                                              $4      'InvalidArgumentException'
         11        INIT_FCALL                                               'sprintf'
         12        SEND_VAL                                                 'Invalid+%22%25s%22+locale.'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        SEND_VAR_NO_REF_EX                                       $5
         16        DO_FCALL                                      0          
         17      > THROW                                         0          $4
   11    18    > > RETURN                                                   null

End of function assertvalidlocale

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.01 ms | 944 KiB | 21 Q