3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Future-friendly json_encode if(!function_exists('json_encode')) { //require_once dirname(__FILE__) '/JSON.php'; function json_encode($data) { //$json = new Services_JSON(); //return $json->encode($data); } } // Future-friendly json_decode if(!function_exists('json_decode')) { //require_once dirname(__FILE__) '/JSON.php'; function json_decode($data) { //$json = new Services_JSON(); //return $json->decode($data); } } /** * Premailer API PHP class * Premailer is a library/service for making HTML more palatable for various inept email clients, in particular GMail * Primary function is to convert style tags into equivalent inline styles so styling can survive <head> tag removal * Premailer is owned by Dialect Communications group * @link http://premailer.dialect.ca/api * @author Marcus Bointon <marcus@synchromedia.co.uk> */ class Premailer { /** * The Premailer API URL */ var $ENDPOINT = 'http://premailer.dialect.ca/api/0.1/documents'; /** * Central static method for submitting either an HTML string or a URL, optionally retrieving converted versions * @static * @throws Exception * @param string $html Raw HTML source * @param string $url URL of the source file * @param bool $fetchresult Whether to also fetch the converted output * @param string $adaptor Which document handler to use (hpricot (default) or nokigiri) * @param string $base_url Base URL for converting relative links * @param int $line_length Length of lines in the plain text version (default 65) * @param string $link_query_string Query string appended to links * @param bool $preserve_styles Whether to preserve any link rel=stylesheet and style elements * @param bool $remove_ids Remove IDs from the HTML document? * @param bool $remove_classes Remove classes from the HTML document? * @param bool $remove_comments Remove comments from the HTML document? * @return array Either a single strclass object containing the decoded JSON response, or a 3-element array containing result, html and plain parts if $fetchresult is set */ /*static*/ function convert($html = '', $url = '', $fetchresult = true, $adaptor = 'hpricot', $base_url = '', $line_length = 65, $link_query_string = '', $preserve_styles = true, $remove_ids = false, $remove_classes = false, $remove_comments = false) { $params = array(); if (!empty($html)) { $params['html'] = $html; } elseif (!empty($url)) { $params['url'] = $url; } else { trigger_error('Must supply an html or url value', E_USER_WARNING); return -1; } if ($adaptor == 'hpricot' or $adaptor == 'nokigiri') { $params['adaptor'] = $adaptor; } if (!empty($base_url)) { $params['base_url'] = $base_url; } $params['line_length'] = (integer)$line_length; if (!empty($link_query_string)) { $params['link_query_string'] = $link_query_string; } $params['preserve_styles'] = ($preserve_styles?'true':'false'); $params['remove_ids'] = ($remove_ids?'true':'false'); $params['remove_classes'] = ($remove_classes?'true':'false'); $params['remove_comments'] = ($remove_comments?'true':'false'); $options = array( 'timeout' => 15, 'connecttimeout' => 15, 'useragent' => 'PHP Premailer', 'ssl' => array('verifypeer' => false, 'verifyhost' => false) ); // $h = new HttpRequest(self::ENDPOINT, HttpRequest::METH_POST, $options); $conf = array( 'url' => Premailer::$ENDPOINT, 'timeout' => 15, 'useragent' => 'PHP Premailer', 'ssl_verifyhost' => 0, 'SSL_VERIFYPEER' => 0, 'post' => 1, 'postfields' => $params, 'returntransfer' => true, 'httpheader' => array("Expect:") ); foreach($conf as $key => $value){ $name = constant('CURLOPT_'.strtoupper($key)); $val = $value; $data_conf[$name] = $val; } $cu = curl_init(); curl_setopt_array($cu, $data_conf); $exec = curl_exec($cu); $_res = json_decode($exec); $_res_info = json_decode(json_encode(curl_getinfo($cu))); curl_close($cu); if($_res_info->http_code != 201){ $code = $_res_info->http_code; switch ($code) { case 400: trigger_error('Content missing', E_USER_WARNING); return -1; break; case 403: trigger_error('Access forbidden', E_USER_WARNING); return -1; break; case 500: default: trigger_error('Error '.$code, E_USER_WARNING); return -1; } } $return = array('result' => $_res); if ($fetchresult) { $html = curl_init(); curl_setopt_array( $html, array( CURLOPT_URL => $_res->documents->html, CURLOPT_TIMEOUT => 15, CURLOPT_USERAGENT => 'PHP Premailer', CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_HTTPHEADER => array("Expect:"), CURLOPT_RETURNTRANSFER => true ) ); $return['html'] = curl_exec($html); curl_close($html); $plain = curl_init(); curl_setopt_array( $plain, array( CURLOPT_URL => $_res->documents->txt, CURLOPT_TIMEOUT => 15, CURLOPT_USERAGENT => 'PHP Premailer', CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_HTTPHEADER => array("Expect:"), CURLOPT_RETURNTRANSFER => true ) ); $return['plain'] = curl_exec($plain); curl_close($plain); return $return; } return $result; } /** * Central static method for submitting either an HTML string or a URL, optionally retrieving converted versions * @static * @throws Exception * @param string $html Raw HTML source * @param bool $fetchresult Whether to also fetch the converted output * @param string $adaptor Which document handler to use (hpricot (default) or nokigiri) * @param string $base_url Base URL for converting relative links * @param int $line_length Length of lines in the plain text version (default 65) * @param string $link_query_string Query string appended to links * @param bool $preserve_styles Whether to preserve any link rel=stylesheet and style elements * @param bool $remove_ids Remove IDs from the HTML document? * @param bool $remove_classes Remove classes from the HTML document? * @param bool $remove_comments Remove comments from the HTML document? * @return array Either a single element array containing the 'result' object, or three elements containing result, html and plain if $fetchresult is set */ /*static*/ function html($html, $fetchresult = true, $adaptor = 'hpricot', $base_url = '', $line_length = 65, $link_query_string = '', $preserve_styles = true, $remove_ids = false, $remove_classes = false, $remove_comments = false) { return Premailer::convert($html, '', $fetchresult, $adaptor, $base_url, $line_length, $link_query_string, $preserve_styles, $remove_ids, $remove_classes, $remove_comments); } /** * Central static method for submitting either an HTML string or a URL, optionally retrieving converted versions * @static * @throws Exception * @param string $url URL of the source file * @param bool $fetchresult Whether to also fetch the converted output * @param string $adaptor Which document handler to use (hpricot (default) or nokigiri) * @param string $base_url Base URL for converting relative links * @param int $line_length Length of lines in the plain text version (default 65) * @param string $link_query_string Query string appended to links * @param bool $preserve_styles Whether to preserve any link rel=stylesheet and style elements * @param bool $remove_ids Remove IDs from the HTML document? * @param bool $remove_classes Remove classes from the HTML document? * @param bool $remove_comments Remove comments from the HTML document? * @return array Either a single element array containing the 'result' object, or three elements containing result, html and plain if $fetchresult is set */ /*static*/ function url($url, $fetchresult = true, $adaptor = 'hpricot', $base_url = '', $line_length = 65, $link_query_string = '', $preserve_styles = true, $remove_ids = false, $remove_classes = false, $remove_comments = false) { return Premailer::convert('', $url, $fetchresult, $adaptor, $base_url, $line_length, $link_query_string, $preserve_styles, $remove_ids, $remove_classes, $remove_comments); } } /* Simplest usage: $pre = Premailer::html($var_with_some_html_in); $html = $pre['html']; $plain = $pre['plain']; //Similarly for URLs: $pre = Premailer::url($url); */
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/H9Nqo
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'json_encode'
          2        DO_ICALL                                         $0      
          3        BOOL_NOT                                         ~1      $0
          4      > JMPZ                                                     ~1, ->6
    7     5    >   DECLARE_FUNCTION                                         'json_encode'
   15     6    >   INIT_FCALL                                               'function_exists'
          7        SEND_VAL                                                 'json_decode'
          8        DO_ICALL                                         $2      
          9        BOOL_NOT                                         ~3      $2
         10      > JMPZ                                                     ~3, ->12
   18    11    >   DECLARE_FUNCTION                                         'json_decode'
  217    12    > > RETURN                                                   1

Function %00json_encode%2Fin%2FH9Nqo%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H9Nqo
function name:  json_encode
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
   11     1      > RETURN                                                   null

End of function %00json_encode%2Fin%2FH9Nqo%3A7%240

Function %00json_decode%2Fin%2FH9Nqo%3A18%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H9Nqo
function name:  json_decode
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   22     1      > RETURN                                                   null

End of function %00json_decode%2Fin%2FH9Nqo%3A18%241

Class Premailer:
Function convert:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 47) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 49
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 52
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 58
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 70
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
2 jumps found. (Code = 77) Position 1 = 86, Position 2 = 100
Branch analysis from position: 86
2 jumps found. (Code = 78) Position 1 = 87, Position 2 = 100
Branch analysis from position: 87
1 jumps found. (Code = 42) Position 1 = 86
Branch analysis from position: 86
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 132, Position 2 = 159
Branch analysis from position: 132
2 jumps found. (Code = 44) Position 1 = 136, Position 2 = 141
Branch analysis from position: 136
2 jumps found. (Code = 44) Position 1 = 138, Position 2 = 147
Branch analysis from position: 138
2 jumps found. (Code = 44) Position 1 = 140, Position 2 = 153
Branch analysis from position: 140
1 jumps found. (Code = 42) Position 1 = 153
Branch analysis from position: 153
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 153
Branch analysis from position: 147
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 141
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 159
2 jumps found. (Code = 43) Position 1 = 162, Position 2 = 225
Branch analysis from position: 162
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 225
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
Branch analysis from position: 70
2 jumps found. (Code = 77) Position 1 = 86, Position 2 = 100
Branch analysis from position: 86
Branch analysis from position: 100
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 70
Branch analysis from position: 68
Branch analysis from position: 70
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
Branch analysis from position: 64
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 58
Branch analysis from position: 56
Branch analysis from position: 58
Branch analysis from position: 49
Branch analysis from position: 41
Branch analysis from position: 36
Branch analysis from position: 33
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H9Nqo
function name:  convert
number of ops:  227
compiled vars:  !0 = $html, !1 = $url, !2 = $fetchresult, !3 = $adaptor, !4 = $base_url, !5 = $line_length, !6 = $link_query_string, !7 = $preserve_styles, !8 = $remove_ids, !9 = $remove_classes, !10 = $remove_comments, !11 = $params, !12 = $options, !13 = $conf, !14 = $value, !15 = $key, !16 = $name, !17 = $val, !18 = $data_conf, !19 = $cu, !20 = $exec, !21 = $_res, !22 = $_res_info, !23 = $code, !24 = $return, !25 = $plain, !26 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   57     0  E >   RECV_INIT                                        !0      ''
          1        RECV_INIT                                        !1      ''
          2        RECV_INIT                                        !2      <true>
          3        RECV_INIT                                        !3      'hpricot'
          4        RECV_INIT                                        !4      ''
          5        RECV_INIT                                        !5      65
          6        RECV_INIT                                        !6      ''
          7        RECV_INIT                                        !7      <true>
          8        RECV_INIT                                        !8      <false>
          9        RECV_INIT                                        !9      <false>
         10        RECV_INIT                                        !10     <false>
   58    11        ASSIGN                                                   !11, <array>
   59    12        ISSET_ISEMPTY_CV                                 ~28     !0
         13        BOOL_NOT                                         ~29     ~28
         14      > JMPZ                                                     ~29, ->18
   60    15    >   ASSIGN_DIM                                               !11, 'html'
         16        OP_DATA                                                  !0
         17      > JMP                                                      ->29
   61    18    >   ISSET_ISEMPTY_CV                                 ~31     !1
         19        BOOL_NOT                                         ~32     ~31
         20      > JMPZ                                                     ~32, ->24
   62    21    >   ASSIGN_DIM                                               !11, 'url'
         22        OP_DATA                                                  !1
         23      > JMP                                                      ->29
   64    24    >   INIT_FCALL                                               'trigger_error'
         25        SEND_VAL                                                 'Must+supply+an+html+or+url+value'
         26        SEND_VAL                                                 512
         27        DO_ICALL                                                 
   65    28      > RETURN                                                   -1
   67    29    >   IS_EQUAL                                         ~35     !3, 'hpricot'
         30      > JMPNZ_EX                                         ~35     ~35, ->33
         31    >   IS_EQUAL                                         ~36     !3, 'nokigiri'
         32        BOOL                                             ~35     ~36
         33    > > JMPZ                                                     ~35, ->36
   68    34    >   ASSIGN_DIM                                               !11, 'adaptor'
         35        OP_DATA                                                  !3
   70    36    >   ISSET_ISEMPTY_CV                                 ~38     !4
         37        BOOL_NOT                                         ~39     ~38
         38      > JMPZ                                                     ~39, ->41
   71    39    >   ASSIGN_DIM                                               !11, 'base_url'
         40        OP_DATA                                                  !4
   73    41    >   CAST                                          4  ~42     !5
         42        ASSIGN_DIM                                               !11, 'line_length'
         43        OP_DATA                                                  ~42
   74    44        ISSET_ISEMPTY_CV                                 ~43     !6
         45        BOOL_NOT                                         ~44     ~43
         46      > JMPZ                                                     ~44, ->49
   75    47    >   ASSIGN_DIM                                               !11, 'link_query_string'
         48        OP_DATA                                                  !6
   77    49    > > JMPZ                                                     !7, ->52
         50    >   QM_ASSIGN                                        ~47     'true'
         51      > JMP                                                      ->53
         52    >   QM_ASSIGN                                        ~47     'false'
         53    >   ASSIGN_DIM                                               !11, 'preserve_styles'
         54        OP_DATA                                                  ~47
   78    55      > JMPZ                                                     !8, ->58
         56    >   QM_ASSIGN                                        ~49     'true'
         57      > JMP                                                      ->59
         58    >   QM_ASSIGN                                        ~49     'false'
         59    >   ASSIGN_DIM                                               !11, 'remove_ids'
         60        OP_DATA                                                  ~49
   79    61      > JMPZ                                                     !9, ->64
         62    >   QM_ASSIGN                                        ~51     'true'
         63      > JMP                                                      ->65
         64    >   QM_ASSIGN                                        ~51     'false'
         65    >   ASSIGN_DIM                                               !11, 'remove_classes'
         66        OP_DATA                                                  ~51
   80    67      > JMPZ                                                     !10, ->70
         68    >   QM_ASSIGN                                        ~53     'true'
         69      > JMP                                                      ->71
         70    >   QM_ASSIGN                                        ~53     'false'
         71    >   ASSIGN_DIM                                               !11, 'remove_comments'
         72        OP_DATA                                                  ~53
   81    73        ASSIGN                                                   !12, <array>
   91    74        FETCH_STATIC_PROP_R          global lock         ~55     'ENDPOINT'
         75        INIT_ARRAY                                       ~56     ~55, 'url'
   92    76        ADD_ARRAY_ELEMENT                                ~56     15, 'timeout'
   93    77        ADD_ARRAY_ELEMENT                                ~56     'PHP+Premailer', 'useragent'
   94    78        ADD_ARRAY_ELEMENT                                ~56     0, 'ssl_verifyhost'
   95    79        ADD_ARRAY_ELEMENT                                ~56     0, 'SSL_VERIFYPEER'
   96    80        ADD_ARRAY_ELEMENT                                ~56     1, 'post'
   97    81        ADD_ARRAY_ELEMENT                                ~56     !11, 'postfields'
   91    82        ADD_ARRAY_ELEMENT                                ~56     <true>, 'returntransfer'
         83        ADD_ARRAY_ELEMENT                                ~56     <array>, 'httpheader'
   90    84        ASSIGN                                                   !13, ~56
  102    85      > FE_RESET_R                                       $58     !13, ->100
         86    > > FE_FETCH_R                                       ~59     $58, !14, ->100
         87    >   ASSIGN                                                   !15, ~59
  103    88        INIT_FCALL                                               'constant'
         89        INIT_FCALL                                               'strtoupper'
         90        SEND_VAR                                                 !15
         91        DO_ICALL                                         $61     
         92        CONCAT                                           ~62     'CURLOPT_', $61
         93        SEND_VAL                                                 ~62
         94        DO_ICALL                                         $63     
         95        ASSIGN                                                   !16, $63
  104    96        ASSIGN                                                   !17, !14
  105    97        ASSIGN_DIM                                               !18, !16
         98        OP_DATA                                                  !17
  102    99      > JMP                                                      ->86
        100    >   FE_FREE                                                  $58
  107   101        INIT_FCALL_BY_NAME                                       'curl_init'
        102        DO_FCALL                                      0  $67     
        103        ASSIGN                                                   !19, $67
  108   104        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
        105        SEND_VAR_EX                                              !19
        106        SEND_VAR_EX                                              !18
        107        DO_FCALL                                      0          
  109   108        INIT_FCALL_BY_NAME                                       'curl_exec'
        109        SEND_VAR_EX                                              !19
        110        DO_FCALL                                      0  $70     
        111        ASSIGN                                                   !20, $70
  110   112        INIT_FCALL                                               'json_decode'
        113        SEND_VAR                                                 !20
        114        DO_ICALL                                         $72     
        115        ASSIGN                                                   !21, $72
  111   116        INIT_FCALL                                               'json_decode'
        117        INIT_FCALL                                               'json_encode'
        118        INIT_FCALL_BY_NAME                                       'curl_getinfo'
        119        SEND_VAR_EX                                              !19
        120        DO_FCALL                                      0  $74     
        121        SEND_VAR                                                 $74
        122        DO_ICALL                                         $75     
        123        SEND_VAR                                                 $75
        124        DO_ICALL                                         $76     
        125        ASSIGN                                                   !22, $76
  112   126        INIT_FCALL_BY_NAME                                       'curl_close'
        127        SEND_VAR_EX                                              !19
        128        DO_FCALL                                      0          
  113   129        FETCH_OBJ_R                                      ~79     !22, 'http_code'
        130        IS_NOT_EQUAL                                             ~79, 201
        131      > JMPZ                                                     ~80, ->159
  114   132    >   FETCH_OBJ_R                                      ~81     !22, 'http_code'
        133        ASSIGN                                                   !23, ~81
  116   134        IS_EQUAL                                                 !23, 400
        135      > JMPNZ                                                    ~83, ->141
  120   136    >   IS_EQUAL                                                 !23, 403
        137      > JMPNZ                                                    ~83, ->147
  124   138    >   IS_EQUAL                                                 !23, 500
        139      > JMPNZ                                                    ~83, ->153
        140    > > JMP                                                      ->153
  117   141    >   INIT_FCALL                                               'trigger_error'
        142        SEND_VAL                                                 'Content+missing'
        143        SEND_VAL                                                 512
        144        DO_ICALL                                                 
  118   145      > RETURN                                                   -1
  119   146*       JMP                                                      ->159
  121   147    >   INIT_FCALL                                               'trigger_error'
        148        SEND_VAL                                                 'Access+forbidden'
        149        SEND_VAL                                                 512
        150        DO_ICALL                                                 
  122   151      > RETURN                                                   -1
  123   152*       JMP                                                      ->159
  126   153    >   INIT_FCALL                                               'trigger_error'
        154        CONCAT                                           ~86     'Error+', !23
        155        SEND_VAL                                                 ~86
        156        SEND_VAL                                                 512
        157        DO_ICALL                                                 
  127   158      > RETURN                                                   -1
  131   159    >   INIT_ARRAY                                       ~88     !21, 'result'
        160        ASSIGN                                                   !24, ~88
  132   161      > JMPZ                                                     !2, ->225
  133   162    >   INIT_FCALL_BY_NAME                                       'curl_init'
        163        DO_FCALL                                      0  $90     
        164        ASSIGN                                                   !0, $90
  134   165        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
  135   166        SEND_VAR_EX                                              !0
  136   167        FETCH_CONSTANT                                   ~92     'CURLOPT_URL'
        168        FETCH_OBJ_R                                      ~93     !21, 'documents'
        169        FETCH_OBJ_R                                      ~94     ~93, 'html'
        170        INIT_ARRAY                                       ~95     ~94, ~92
  137   171        FETCH_CONSTANT                                   ~96     'CURLOPT_TIMEOUT'
        172        ADD_ARRAY_ELEMENT                                ~95     15, ~96
  138   173        FETCH_CONSTANT                                   ~97     'CURLOPT_USERAGENT'
        174        ADD_ARRAY_ELEMENT                                ~95     'PHP+Premailer', ~97
  139   175        FETCH_CONSTANT                                   ~98     'CURLOPT_SSL_VERIFYHOST'
        176        ADD_ARRAY_ELEMENT                                ~95     0, ~98
  140   177        FETCH_CONSTANT                                   ~99     'CURLOPT_SSL_VERIFYPEER'
        178        ADD_ARRAY_ELEMENT                                ~95     0, ~99
  141   179        FETCH_CONSTANT                                   ~100    'CURLOPT_HTTPHEADER'
  136   180        ADD_ARRAY_ELEMENT                                ~95     <array>, ~100
  142   181        FETCH_CONSTANT                                   ~101    'CURLOPT_RETURNTRANSFER'
  136   182        ADD_ARRAY_ELEMENT                                ~95     <true>, ~101
        183        SEND_VAL_EX                                              ~95
        184        DO_FCALL                                      0          
  145   185        INIT_FCALL_BY_NAME                                       'curl_exec'
        186        SEND_VAR_EX                                              !0
        187        DO_FCALL                                      0  $104    
        188        ASSIGN_DIM                                               !24, 'html'
        189        OP_DATA                                                  $104
  146   190        INIT_FCALL_BY_NAME                                       'curl_close'
        191        SEND_VAR_EX                                              !0
        192        DO_FCALL                                      0          
  148   193        INIT_FCALL_BY_NAME                                       'curl_init'
        194        DO_FCALL                                      0  $106    
        195        ASSIGN                                                   !25, $106
  149   196        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
  150   197        SEND_VAR_EX                                              !25
  151   198        FETCH_CONSTANT                                   ~108    'CURLOPT_URL'
        199        FETCH_OBJ_R                                      ~109    !21, 'documents'
        200        FETCH_OBJ_R                                      ~110    ~109, 'txt'
        201        INIT_ARRAY                                       ~111    ~110, ~108
  152   202        FETCH_CONSTANT                                   ~112    'CURLOPT_TIMEOUT'
        203        ADD_ARRAY_ELEMENT                                ~111    15, ~112
  153   204        FETCH_CONSTANT                                   ~113    'CURLOPT_USERAGENT'
        205        ADD_ARRAY_ELEMENT                                ~111    'PHP+Premailer', ~113
  154   206        FETCH_CONSTANT                                   ~114    'CURLOPT_SSL_VERIFYHOST'
        207        ADD_ARRAY_ELEMENT                                ~111    0, ~114
  155   208        FETCH_CONSTANT                                   ~115    'CURLOPT_SSL_VERIFYPEER'
        209        ADD_ARRAY_ELEMENT                                ~111    0, ~115
  156   210        FETCH_CONSTANT                                   ~116    'CURLOPT_HTTPHEADER'
  151   211        ADD_ARRAY_ELEMENT                                ~111    <array>, ~116
  157   212        FETCH_CONSTANT                                   ~117    'CURLOPT_RETURNTRANSFER'
  151   213        ADD_ARRAY_ELEMENT                                ~111    <true>, ~117
        214        SEND_VAL_EX                                              ~111
        215        DO_FCALL                                      0          
  160   216        INIT_FCALL_BY_NAME                                       'curl_exec'
        217        SEND_VAR_EX                                              !25
        218        DO_FCALL                                      0  $120    
        219        ASSIGN_DIM                                               !24, 'plain'
        220        OP_DATA                                                  $120
  161   221        INIT_FCALL_BY_NAME                                       'curl_close'
        222        SEND_VAR_EX                                              !25
        223        DO_FCALL                                      0          
  163   224      > RETURN                                                   !24
  165   225    > > RETURN                                                   !26
  167   226*     > RETURN                                                   null

End of function convert

Function html:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H9Nqo
function name:  html
number of ops:  25
compiled vars:  !0 = $html, !1 = $fetchresult, !2 = $adaptor, !3 = $base_url, !4 = $line_length, !5 = $link_query_string, !6 = $preserve_styles, !7 = $remove_ids, !8 = $remove_classes, !9 = $remove_comments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  185     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <true>
          2        RECV_INIT                                        !2      'hpricot'
          3        RECV_INIT                                        !3      ''
          4        RECV_INIT                                        !4      65
          5        RECV_INIT                                        !5      ''
          6        RECV_INIT                                        !6      <true>
          7        RECV_INIT                                        !7      <false>
          8        RECV_INIT                                        !8      <false>
          9        RECV_INIT                                        !9      <false>
  186    10        INIT_STATIC_METHOD_CALL                                  'Premailer', 'convert'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 ''
         13        SEND_VAR                                                 !1
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !4
         17        SEND_VAR                                                 !5
         18        SEND_VAR                                                 !6
         19        SEND_VAR                                                 !7
         20        SEND_VAR                                                 !8
         21        SEND_VAR                                                 !9
         22        DO_FCALL                                      0  $10     
         23      > RETURN                                                   $10
  187    24*     > RETURN                                                   null

End of function html

Function url:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H9Nqo
function name:  url
number of ops:  25
compiled vars:  !0 = $url, !1 = $fetchresult, !2 = $adaptor, !3 = $base_url, !4 = $line_length, !5 = $link_query_string, !6 = $preserve_styles, !7 = $remove_ids, !8 = $remove_classes, !9 = $remove_comments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  205     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <true>
          2        RECV_INIT                                        !2      'hpricot'
          3        RECV_INIT                                        !3      ''
          4        RECV_INIT                                        !4      65
          5        RECV_INIT                                        !5      ''
          6        RECV_INIT                                        !6      <true>
          7        RECV_INIT                                        !7      <false>
          8        RECV_INIT                                        !8      <false>
          9        RECV_INIT                                        !9      <false>
  206    10        INIT_STATIC_METHOD_CALL                                  'Premailer', 'convert'
         11        SEND_VAL                                                 ''
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !4
         17        SEND_VAR                                                 !5
         18        SEND_VAR                                                 !6
         19        SEND_VAR                                                 !7
         20        SEND_VAR                                                 !8
         21        SEND_VAR                                                 !9
         22        DO_FCALL                                      0  $10     
         23      > RETURN                                                   $10
  207    24*     > RETURN                                                   null

End of function url

End of class Premailer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.81 ms | 1424 KiB | 25 Q