3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = "."; $last = "a"; $middle= "testing-123.test"; echo "First segment:\t" . (ctype_alnum($first) ? 'valid' : 'invalid') . "\n"; echo "Second segment:\t" . (preg_match("/^[a-z\d.-]+$/i", $middle) ? 'valid' : 'invalid') . "\n"; echo "Third segment:\t" . (ctype_alnum($last) ? 'valid' : 'invalid');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
Branch analysis from position: 30
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
Branch analysis from position: 20
filename:       /in/rGrdN
function name:  (null)
number of ops:  34
compiled vars:  !0 = $first, !1 = $last, !2 = $middle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '.'
    4     1        ASSIGN                                                   !1, 'a'
    5     2        ASSIGN                                                   !2, 'testing-123.test'
    7     3        INIT_FCALL                                               'ctype_alnum'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6      > JMPZ                                                     $6, ->9
          7    >   QM_ASSIGN                                        ~7      'valid'
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~7      'invalid'
         10    >   CONCAT                                           ~8      'First+segment%3A%09', ~7
         11        CONCAT                                           ~9      ~8, '%0A'
         12        ECHO                                                     ~9
    8    13        INIT_FCALL                                               'preg_match'
         14        SEND_VAL                                                 '%2F%5E%5Ba-z%5Cd.-%5D%2B%24%2Fi'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17      > JMPZ                                                     $10, ->20
         18    >   QM_ASSIGN                                        ~11     'valid'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~11     'invalid'
         21    >   CONCAT                                           ~12     'Second+segment%3A%09', ~11
         22        CONCAT                                           ~13     ~12, '%0A'
         23        ECHO                                                     ~13
    9    24        INIT_FCALL                                               'ctype_alnum'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $14     
         27      > JMPZ                                                     $14, ->30
         28    >   QM_ASSIGN                                        ~15     'valid'
         29      > JMP                                                      ->31
         30    >   QM_ASSIGN                                        ~15     'invalid'
         31    >   CONCAT                                           ~16     'Third+segment%3A%09', ~15
         32        ECHO                                                     ~16
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.19 ms | 1004 KiB | 15 Q