3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "The Chernobyl disaster was a catastrophic nuclear accident that occurred on 26 April 1986, in the No. 4 nuclear reactor at the Chernobyl Nuclear Power Plant, near the city of Pripyat, in the north of the Ukrainian SSR."; $pattern = '%[A-Z]\w+%'; preg_match_all($pattern, $string, $matches); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SMck0
function name:  (null)
number of ops:  11
compiled vars:  !0 = $string, !1 = $pattern, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'The+Chernobyl+disaster+was+a+catastrophic+nuclear+accident+that+occurred+on+26+April+1986%2C+in+the+No.+4+nuclear+reactor+at+the+Chernobyl+Nuclear+Power+Plant%2C+near+the+city+of+Pripyat%2C+in+the+north+of+the+Ukrainian+SSR.'
    5     1        ASSIGN                                                   !1, '%25%5BA-Z%5D%5Cw%2B%25'
    7     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    9     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.83 ms | 1436 KiB | 15 Q