3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'Bienvenue chez nous'; $result = match (true) { preg_match('/Bienvenue/', $text) || false => 'fr', default => 'other', }; var_dump($result); $result = match (true) { preg_match('/Bienvenue/', $text) => 'fr', default => 'other', }; var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/h78ue
function name:  (null)
number of ops:  34
compiled vars:  !0 = $text, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Bienvenue+chez+nous'
    6     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2FBienvenue%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5      > JMPNZ_EX                                         ~5      $4, ->7
    5     6    >   BOOL                                             ~5      <false>
          7    >   IS_IDENTICAL                                             ~5, <true>
          8      > JMPNZ                                                    ~3, ->10
          9    > > JMP                                                      ->12
    6    10    >   QM_ASSIGN                                        ~6      'fr'
         11      > JMP                                                      ->14
    7    12    >   QM_ASSIGN                                        ~6      'other'
         13      > JMP                                                      ->14
    5    14    >   ASSIGN                                                   !1, ~6
   10    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   13    18        INIT_FCALL                                               'preg_match'
         19        SEND_VAL                                                 '%2FBienvenue%2F'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $10     
         22        IS_IDENTICAL                                             $10, <true>
         23      > JMPNZ                                                    ~9, ->25
         24    > > JMP                                                      ->27
         25    >   QM_ASSIGN                                        ~11     'fr'
         26      > JMP                                                      ->29
   14    27    >   QM_ASSIGN                                        ~11     'other'
         28      > JMP                                                      ->29
   12    29    >   ASSIGN                                                   !1, ~11
   17    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.79 ms | 1012 KiB | 15 Q