3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_string_between($string, $start, $end){ $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; if($len < 1) return $len; return trim(substr($string,$ini,$len)); } function FS($msg){ return array( "Dealer" => get_string_between($msg, "Name:", "Contact Name:"), "Contact" => get_string_between($msg, "Contact Name:", "Phone:"), "Phone" => get_string_between($msg, "Phone:", "Email:"), "Email" => get_string_between($msg, "Email:", "*"), ); } $str = " -- Dennis R. O'Brien President • O'Brien Targeted Marketing • 3135 State Rd 580 • Safety Harbor, FL 34695 Direct 231.206.8816 • Fax 888.590.2750 • denny@customertrack.net This e-mail is subject to the Electronics Communications Privacy Act,18 U.S.C. §§2510-2521. This e-mail communication and any attachments may containconfidential and privileged information for the use of the designated recipients namedabove. If you are not the intended recipient, you are hereby notified that you havereceived this communication in error and that any review, disclosure, dissemination,distribution or copying of it or its contents is prohibited. If you have received thiscommunication in error, please delete the communication. Date: Sat, 28 Jun 2014 13:14:35 -0700 To: wm3192@hotmail.com; tvnielsen@charter.net; markvanhook@gmail.com Subject: Form Submission from Your Hot Leads From: no-reply@yourhotleads.com Form Submission from Your Hot LeadsDownload CSV file of registered information. Name: Walkers Renton Mazda Contact Name: Zachary Phone: Camacho Email: zc32low@gmail.com "; var_dump(FS($str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v8PoJ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, '%0A%0A--%0A%0ADennis+R.+O%27Brien%0APresident+%E2%80%A2+O%27Brien+Targeted+Marketing+%E2%80%A2+3135+State+Rd+580+%E2%80%A2+Safety+Harbor%2C+FL+34695%0A+Direct+231.206.8816+%E2%80%A2++Fax+888.590.2750++%E2%80%A2+denny%40customertrack.net%0A%0A%0A%0AThis+e-mail+is+subject+to+the+Electronics+Communications+Privacy+Act%2C18+U.S.C.+%C2%A7%C2%A72510-2521.+This+e-mail+communication+and+any+attachments+may+containconfidential+and+privileged+information+for+the+use+of+the+designated+recipients+namedabove.+If+you+are+not+the+intended+recipient%2C+you+are+hereby+notified+that+you+havereceived+this+communication+in+error+and+that+any+review%2C+disclosure%2C+dissemination%2Cdistribution+or+copying+of+it+or+its+contents+is+prohibited.+If+you+have+received+thiscommunication+in+error%2C+please+delete+the+communication.++%0A+%0ADate%3A+Sat%2C+28+Jun+2014+13%3A14%3A35+-0700%0ATo%3A+wm3192%40hotmail.com%3B+tvnielsen%40charter.net%3B+markvanhook%40gmail.com%0ASubject%3A+Form+Submission+from+Your+Hot+Leads%0AFrom%3A+no-reply%40yourhotleads.com%0A%0AForm+Submission+from+Your+Hot+LeadsDownload+CSV+file+of+registered+information.%0A%0AName%3A+%0A+Walkers+Renton+Mazda%0A%0AContact+Name%3A+%0A+Zachary%0A%0APhone%3A+%0A+Camacho%0A%0AEmail%3A+%0A+zc32low%40gmail.com%0A%0A+%09%09+%09+++%09%09++%0A'
   55     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'fs'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function get_string_between:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v8PoJ
function name:  get_string_between
number of ops:  33
compiled vars:  !0 = $string, !1 = $start, !2 = $end, !3 = $ini, !4 = $len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !3, $5
    5     8        IS_EQUAL                                                 !3, 0
          9      > JMPZ                                                     ~7, ->11
         10    > > RETURN                                                   ''
    6    11    >   STRLEN                                           ~8      !1
         12        ASSIGN_OP                                     1          !3, ~8
    7    13        INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $10     
         18        SUB                                              ~11     $10, !3
         19        ASSIGN                                                   !4, ~11
    8    20        IS_SMALLER                                               !4, 1
         21      > JMPZ                                                     ~13, ->23
         22    > > RETURN                                                   !4
    9    23    >   INIT_FCALL                                               'trim'
         24        INIT_FCALL                                               'substr'
         25        SEND_VAR                                                 !0
         26        SEND_VAR                                                 !3
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $14     
         29        SEND_VAR                                                 $14
         30        DO_ICALL                                         $15     
         31      > RETURN                                                   $15
   10    32*     > RETURN                                                   null

End of function get_string_between

Function fs:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v8PoJ
function name:  FS
number of ops:  27
compiled vars:  !0 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'get_string_between'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'Name%3A'
          4        SEND_VAL                                                 'Contact+Name%3A'
          5        DO_FCALL                                      0  $1      
          6        INIT_ARRAY                                       ~2      $1, 'Dealer'
   15     7        INIT_FCALL                                               'get_string_between'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 'Contact+Name%3A'
         10        SEND_VAL                                                 'Phone%3A'
         11        DO_FCALL                                      0  $3      
         12        ADD_ARRAY_ELEMENT                                ~2      $3, 'Contact'
   16    13        INIT_FCALL                                               'get_string_between'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'Phone%3A'
         16        SEND_VAL                                                 'Email%3A'
         17        DO_FCALL                                      0  $4      
         18        ADD_ARRAY_ELEMENT                                ~2      $4, 'Phone'
   17    19        INIT_FCALL                                               'get_string_between'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 'Email%3A'
         22        SEND_VAL                                                 '%2A'
         23        DO_FCALL                                      0  $5      
         24        ADD_ARRAY_ELEMENT                                ~2      $5, 'Email'
         25      > RETURN                                                   ~2
   19    26*     > RETURN                                                   null

End of function fs

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.19 ms | 1407 KiB | 26 Q