3v4l.org

run code in 300+ PHP versions simultaneously
<?php $articles = "Maybe it’s less true than it used to be that people are made of place--that the same elements that form coal and clay and bogs and ice form faces, voices and characters. I wrote my first collection of short stories, The Bostons, in homage to this book, hoping, as did Joyce’s young Stephen Dedalus, to encounter for the millionth time the reality of experience and to forge in the smithy of my soul the uncreated conscience of some island-dwellers I knew."; $keywords = "less true than, people are made, smithy of my soul, uncreated conscience, this is a test string"; $keywordsArray = explode(', ',$keywords); $pattern = '/'.implode('|',$keywordsArray).'/'; preg_match_all($pattern,$articles,$matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fnuih
function name:  (null)
number of ops:  23
compiled vars:  !0 = $articles, !1 = $keywords, !2 = $keywordsArray, !3 = $pattern, !4 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Maybe+it%E2%80%99s+less+true+than+it+used+to+be+that+people+are+made+of+%0A+++place--that+the+same+elements+that+form+coal+and+clay+and+bogs+and+ice+form+%0A+++faces%2C+voices+and+characters.+I+wrote+my+first+collection+of+short+stories%2C+%0A+++The+Bostons%2C+in+homage+to+this+book%2C+hoping%2C+as+did+Joyce%E2%80%99s+young+Stephen+%0A+++Dedalus%2C+to+encounter+for+the+millionth+time+the+reality+of+experience+and+to+%0A+++forge+in+the+smithy+of+my+soul+the+uncreated+conscience+of+some+island-dwellers%0A+++I+knew.'
   10     1        ASSIGN                                                   !1, 'less+true+than%2C+people+are+made%2C+smithy+of+my+soul%2C+uncreated+conscience%2C+this+is+a+test+string'
   12     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C+'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
   14     7        INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '%7C'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $9      
         11        CONCAT                                           ~10     '%2F', $9
         12        CONCAT                                           ~11     ~10, '%2F'
         13        ASSIGN                                                   !3, ~11
   15    14        INIT_FCALL                                               'preg_match_all'
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !0
         17        SEND_REF                                                 !4
         18        DO_ICALL                                                 
   17    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.1 ms | 1395 KiB | 21 Q