3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<str <td width="551"> <p><strong>Full Time Faculty<br> <strong></strong>Assistant Professor</strong></p>Doctorate of Business Administration<br><br> <strong>Phone</strong>: +88 01756567676<br> <strong>Email</strong>: frank.wade@email.com<br> <strong>Office</strong>: NAC739<br> <br><p><b>Curriculum Vitae</b></p></td> str; // We explode $str and use '</strong>' as delimiter and get only the part of result that we need $lines = array_slice(explode('</strong>', $str), 3, 3); // Define a function to remove extra text from left and right of our so called lines function stripLine($line) { // ltrim ' ;' characters and remove everything after (and including) '<br>' return preg_replace('/<br>.*/is', '', ltrim($line, ' :')); } $lines = array_map('stripLine', $lines); print_r($lines);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DFm8N
function name:  (null)
number of ops:  20
compiled vars:  !0 = $str, !1 = $lines
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ctd+width%3D%22551%22%3E%0A%3Cp%3E%3Cstrong%3EFull+Time+Faculty%3Cbr%3E%0A%3Cstrong%3E%3C%2Fstrong%3EAssistant+Professor%3C%2Fstrong%3E%3C%2Fp%3EDoctorate+of+Business+Administration%3Cbr%3E%3Cbr%3E%0A%3Cstrong%3EPhone%3C%2Fstrong%3E%3A+%2B88+01756567676%3Cbr%3E%0A%3Cstrong%3EEmail%3C%2Fstrong%3E%3A+frank.wade%40email.com%3Cbr%3E%0A%3Cstrong%3EOffice%3C%2Fstrong%3E%3A+NAC739%3Cbr%3E%0A%3Cbr%3E%3Cp%3E%3Cb%3ECurriculum+Vitae%3C%2Fb%3E%3C%2Fp%3E%3C%2Ftd%3E'
   14     1        INIT_FCALL                                               'array_slice'
          2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%3C%2Fstrong%3E'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        SEND_VAL                                                 3
          8        SEND_VAL                                                 3
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
   20    11        INIT_FCALL                                               'array_map'
         12        SEND_VAL                                                 'stripLine'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !1, $6
   22    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function stripline:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DFm8N
function name:  stripLine
number of ops:  12
compiled vars:  !0 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%3Cbr%3E.%2A%2Fis'
          3        SEND_VAL                                                 ''
          4        INIT_FCALL                                               'ltrim'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '+%3A'
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                         $2      
         10      > RETURN                                                   $2
   19    11*     > RETURN                                                   null

End of function stripline

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.26 ms | 1004 KiB | 19 Q