3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Command line utility to use dompdf. * Can also be used with HTTP GET parameters * * @package dompdf * @link http://dompdf.github.com/ * @author Benj Carson <benjcarson@digitaljunkies.ca> * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ /** * Display command line usage */ function dompdf_usage() { $default_paper_size = DOMPDF_DEFAULT_PAPER_SIZE; echo <<<EOD Usage: {$_SERVER["argv"][0]} [options] html_file html_file can be a filename, a url if fopen_wrappers are enabled, or the '-' character to read from standard input. Options: -h Show this message -l List available paper sizes -p size Paper size; something like 'letter', 'A4', 'legal', etc. The default is '$default_paper_size' -o orientation Either 'portrait' or 'landscape'. Default is 'portrait' -b path Set the 'document root' of the html_file. Relative urls (for stylesheets) are resolved using this directory. Default is the directory of html_file. -f file The output filename. Default is the input [html_file].pdf -v Verbose: display html parsing warnings and file not found errors. -d Very verbose: display oodles of debugging output: every frame in the tree printed to stdout. -t Comma separated list of debugging types (page-break,reflow,split) EOD; exit; } /** * Parses command line options * * @return array The command line options */ function getoptions() { $opts = array(); if ( $_SERVER["argc"] == 1 ) return $opts; $i = 1; while ($i < $_SERVER["argc"]) { switch ($_SERVER["argv"][$i]) { case "--help": case "-h": $opts["h"] = true; $i++; break; case "-l": $opts["l"] = true; $i++; break; case "-p": if ( !isset($_SERVER["argv"][$i+1]) ) die("-p switch requires a size parameter\n"); $opts["p"] = $_SERVER["argv"][$i+1]; $i += 2; break; case "-o": if ( !isset($_SERVER["argv"][$i+1]) ) die("-o switch requires an orientation parameter\n"); $opts["o"] = $_SERVER["argv"][$i+1]; $i += 2; break; case "-b": if ( !isset($_SERVER["argv"][$i+1]) ) die("-b switch requires a path parameter\n"); $opts["b"] = $_SERVER["argv"][$i+1]; $i += 2; break; case "-f": if ( !isset($_SERVER["argv"][$i+1]) ) die("-f switch requires a filename parameter\n"); $opts["f"] = $_SERVER["argv"][$i+1]; $i += 2; break; case "-v": $opts["v"] = true; $i++; break; case "-d": $opts["d"] = true; $i++; break; case "-t": if ( !isset($_SERVER['argv'][$i + 1]) ) die("-t switch requires a comma separated list of types\n"); $opts["t"] = $_SERVER['argv'][$i+1]; $i += 2; break; default: $opts["filename"] = $_SERVER["argv"][$i]; $i++; break; } } return $opts; } require_once("https://raw.githubusercontent.com/dompdf/dompdf/master/dompdf_config.inc.php"); global $_dompdf_show_warnings, $_dompdf_debug, $_DOMPDF_DEBUG_TYPES; $sapi = php_sapi_name(); $options = array(); switch ( $sapi ) { case "cli": $opts = getoptions(); if ( isset($opts["h"]) || (!isset($opts["filename"]) && !isset($opts["l"])) ) { dompdf_usage(); exit; } if ( isset($opts["l"]) ) { echo "\nUnderstood paper sizes:\n"; foreach (array_keys(CPDF_Adapter::$PAPER_SIZES) as $size) echo " " . mb_strtoupper($size) . "\n"; exit; } $file = $opts["filename"]; if ( isset($opts["p"]) ) $paper = $opts["p"]; else $paper = DOMPDF_DEFAULT_PAPER_SIZE; if ( isset($opts["o"]) ) $orientation = $opts["o"]; else $orientation = "portrait"; if ( isset($opts["b"]) ) $base_path = $opts["b"]; if ( isset($opts["f"]) ) $outfile = $opts["f"]; else { if ( $file === "-" ) $outfile = "dompdf_out.pdf"; else $outfile = str_ireplace(array(".html", ".htm", ".php"), "", $file) . ".pdf"; } if ( isset($opts["v"]) ) $_dompdf_show_warnings = true; if ( isset($opts["d"]) ) { $_dompdf_show_warnings = true; $_dompdf_debug = true; } if ( isset($opts['t']) ) { $arr = split(',',$opts['t']); $types = array(); foreach ($arr as $type) $types[ trim($type) ] = 1; $_DOMPDF_DEBUG_TYPES = $types; } $save_file = true; break; default: if ( isset($_GET["input_file"]) ) $file = rawurldecode($_GET["input_file"]); else throw new DOMPDF_Exception("An input file is required (i.e. input_file _GET variable)."); if ( isset($_GET["paper"]) ) $paper = rawurldecode($_GET["paper"]); else $paper = DOMPDF_DEFAULT_PAPER_SIZE; if ( isset($_GET["orientation"]) ) $orientation = rawurldecode($_GET["orientation"]); else $orientation = "portrait"; if ( isset($_GET["base_path"]) ) { $base_path = rawurldecode($_GET["base_path"]); $file = $base_path . $file; # Set the input file } if ( isset($_GET["options"]) ) { $options = $_GET["options"]; } $file_parts = explode_url($file); /* Check to see if the input file is local and, if so, that the base path falls within that specified by DOMDPF_CHROOT */ if(($file_parts['protocol'] == '' || $file_parts['protocol'] === 'file://')) { $file = realpath($file); if ( strpos($file, DOMPDF_CHROOT) !== 0 ) { throw new DOMPDF_Exception("Permission denied on $file. The file could not be found under the directory specified by DOMPDF_CHROOT."); } } if($file_parts['protocol'] === 'php://') { throw new DOMPDF_Exception("Permission denied on $file. This script does not allow PHP streams."); } $outfile = "dompdf_out.pdf"; # Don't allow them to set the output file $save_file = false; # Don't save the file break; } $dompdf = new DOMPDF(); if ( $file === "-" ) { $str = ""; while ( !feof(STDIN) ) $str .= fread(STDIN, 4096); $dompdf->load_html($str); } else $dompdf->load_html_file($file); if ( isset($base_path) ) { $dompdf->set_base_path($base_path); } $dompdf->set_paper($paper, $orientation); $dompdf->render(); if ( $_dompdf_show_warnings ) { global $_dompdf_warnings; foreach ($_dompdf_warnings as $msg) echo $msg . "\n"; echo $dompdf->get_canvas()->get_cpdf()->messages; flush(); } if ( $save_file ) { // if ( !is_writable($outfile) ) // throw new DOMPDF_Exception("'$outfile' is not writable."); if ( strtolower(DOMPDF_PDF_BACKEND) === "gd" ) $outfile = str_replace(".pdf", ".png", $outfile); list($proto, $host, $path, $file) = explode_url($outfile); if ( $proto != "" ) // i.e. not file:// $outfile = $file; // just save it locally, FIXME? could save it like wget: ./host/basepath/file $outfile = realpath(dirname($outfile)) . DIRECTORY_SEPARATOR . basename($outfile); if ( strpos($outfile, DOMPDF_CHROOT) !== 0 ) throw new DOMPDF_Exception("Permission denied."); file_put_contents($outfile, $dompdf->output( array("compress" => 0) )); exit(0); } if ( !headers_sent() ) { $dompdf->stream($outfile, $options); }
Finding entry points
Branch analysis from position: 0
3 jumps found. (Code = 188) Position 1 = 12, Position 2 = 110, Position 3 = 9
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 46
Branch analysis from position: 30
2 jumps found. (Code = 77) Position 1 = 36, Position 2 = 44
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 44
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 44
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 44
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 53
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 60
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 65
Branch analysis from position: 63
2 jumps found. (Code = 43) Position 1 = 67, Position 2 = 70
Branch analysis from position: 67
1 jumps found. (Code = 42) Position 1 = 81
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 84
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 86, Position 2 = 88
Branch analysis from position: 86
2 jumps found. (Code = 43) Position 1 = 90, Position 2 = 108
Branch analysis from position: 90
2 jumps found. (Code = 77) Position 1 = 99, Position 2 = 106
Branch analysis from position: 99
2 jumps found. (Code = 78) Position 1 = 100, Position 2 = 106
Branch analysis from position: 100
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
Branch analysis from position: 106
1 jumps found. (Code = 42) Position 1 = 206
Branch analysis from position: 206
2 jumps found. (Code = 43) Position 1 = 211, Position 2 = 229
Branch analysis from position: 211
1 jumps found. (Code = 42) Position 1 = 219
Branch analysis from position: 219
2 jumps found. (Code = 44) Position 1 = 225, Position 2 = 213
Branch analysis from position: 225
1 jumps found. (Code = 42) Position 1 = 232
Branch analysis from position: 232
2 jumps found. (Code = 43) Position 1 = 234, Position 2 = 237
Branch analysis from position: 234
2 jumps found. (Code = 43) Position 1 = 244, Position 2 = 259
Branch analysis from position: 244
2 jumps found. (Code = 77) Position 1 = 246, Position 2 = 250
Branch analysis from position: 246
2 jumps found. (Code = 78) Position 1 = 247, Position 2 = 250
Branch analysis from position: 247
1 jumps found. (Code = 42) Position 1 = 246
Branch analysis from position: 246
Branch analysis from position: 250
2 jumps found. (Code = 43) Position 1 = 260, Position 2 = 318
Branch analysis from position: 260
2 jumps found. (Code = 43) Position 1 = 266, Position 2 = 272
Branch analysis from position: 266
2 jumps found. (Code = 43) Position 1 = 286, Position 2 = 287
Branch analysis from position: 286
2 jumps found. (Code = 43) Position 1 = 306, Position 2 = 310
Branch analysis from position: 306
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 310
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 287
Branch analysis from position: 272
Branch analysis from position: 318
2 jumps found. (Code = 43) Position 1 = 322, Position 2 = 326
Branch analysis from position: 322
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 326
Branch analysis from position: 250
Branch analysis from position: 259
Branch analysis from position: 237
Branch analysis from position: 213
2 jumps found. (Code = 44) Position 1 = 225, Position 2 = 213
Branch analysis from position: 225
Branch analysis from position: 213
Branch analysis from position: 229
2 jumps found. (Code = 43) Position 1 = 234, Position 2 = 237
Branch analysis from position: 234
Branch analysis from position: 237
Branch analysis from position: 106
Branch analysis from position: 108
Branch analysis from position: 88
Branch analysis from position: 84
Branch analysis from position: 70
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 74
Branch analysis from position: 72
1 jumps found. (Code = 42) Position 1 = 81
Branch analysis from position: 81
Branch analysis from position: 74
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 84
Branch analysis from position: 83
Branch analysis from position: 84
Branch analysis from position: 65
Branch analysis from position: 60
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 65
Branch analysis from position: 63
Branch analysis from position: 65
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 57, Position 2 = 60
Branch analysis from position: 57
Branch analysis from position: 60
Branch analysis from position: 23
Branch analysis from position: 24
Branch analysis from position: 110
2 jumps found. (Code = 43) Position 1 = 113, Position 2 = 120
Branch analysis from position: 113
1 jumps found. (Code = 42) Position 1 = 124
Branch analysis from position: 124
2 jumps found. (Code = 43) Position 1 = 127, Position 2 = 134
Branch analysis from position: 127
1 jumps found. (Code = 42) Position 1 = 136
Branch analysis from position: 136
2 jumps found. (Code = 43) Position 1 = 139, Position 2 = 146
Branch analysis from position: 139
1 jumps found. (Code = 42) Position 1 = 147
Branch analysis from position: 147
2 jumps found. (Code = 43) Position 1 = 150, Position 2 = 158
Branch analysis from position: 150
2 jumps found. (Code = 43) Position 1 = 161, Position 2 = 164
Branch analysis from position: 161
2 jumps found. (Code = 47) Position 1 = 171, Position 2 = 174
Branch analysis from position: 171
2 jumps found. (Code = 43) Position 1 = 175, Position 2 = 193
Branch analysis from position: 175
2 jumps found. (Code = 43) Position 1 = 186, Position 2 = 193
Branch analysis from position: 186
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 193
2 jumps found. (Code = 43) Position 1 = 196, Position 2 = 203
Branch analysis from position: 196
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 203
1 jumps found. (Code = 42) Position 1 = 206
Branch analysis from position: 206
Branch analysis from position: 193
Branch analysis from position: 174
Branch analysis from position: 164
Branch analysis from position: 158
Branch analysis from position: 146
2 jumps found. (Code = 43) Position 1 = 150, Position 2 = 158
Branch analysis from position: 150
Branch analysis from position: 158
Branch analysis from position: 134
2 jumps found. (Code = 43) Position 1 = 139, Position 2 = 146
Branch analysis from position: 139
Branch analysis from position: 146
Branch analysis from position: 120
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 110
Branch analysis from position: 110
Branch analysis from position: 12
filename:       /in/nAYJZ
function name:  (null)
number of ops:  327
compiled vars:  !0 = $_dompdf_show_warnings, !1 = $_dompdf_debug, !2 = $_DOMPDF_DEBUG_TYPES, !3 = $sapi, !4 = $options, !5 = $opts, !6 = $size, !7 = $file, !8 = $paper, !9 = $orientation, !10 = $base_path, !11 = $outfile, !12 = $arr, !13 = $types, !14 = $type, !15 = $save_file, !16 = $file_parts, !17 = $dompdf, !18 = $str, !19 = $_dompdf_warnings, !20 = $msg, !21 = $proto, !22 = $host, !23 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  126     0  E >   INCLUDE_OR_EVAL                                          'https%3A%2F%2Fraw.githubusercontent.com%2Fdompdf%2Fdompdf%2Fmaster%2Fdompdf_config.inc.php', REQUIRE_ONCE
  127     1        BIND_GLOBAL                                              !0, '_dompdf_show_warnings'
          2        BIND_GLOBAL                                              !1, '_dompdf_debug'
          3        BIND_GLOBAL                                              !2, '_DOMPDF_DEBUG_TYPES'
  129     4        INIT_FCALL                                               'php_sapi_name'
          5        DO_ICALL                                         $25     
          6        ASSIGN                                                   !3, $25
  130     7        ASSIGN                                                   !4, <array>
  132     8      > SWITCH_STRING                                            !3, [ 'cli':->12, ], ->110
  134     9    >   IS_EQUAL                                                 !3, 'cli'
         10      > JMPNZ                                                    ~28, ->12
         11    > > JMP                                                      ->110
  136    12    >   INIT_FCALL                                               'getoptions'
         13        DO_FCALL                                      0  $29     
         14        ASSIGN                                                   !5, $29
  138    15        ISSET_ISEMPTY_DIM_OBJ                         0  ~31     !5, 'h'
         16      > JMPNZ_EX                                         ~31     ~31, ->24
         17    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~32     !5, 'filename'
         18        BOOL_NOT                                         ~33     ~32
         19      > JMPZ_EX                                          ~33     ~33, ->23
         20    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~34     !5, 'l'
         21        BOOL_NOT                                         ~35     ~34
         22        BOOL                                             ~33     ~35
         23    >   BOOL                                             ~31     ~33
         24    > > JMPZ                                                     ~31, ->28
  139    25    >   INIT_FCALL                                               'dompdf_usage'
         26        DO_FCALL                                      0          
  140    27      > EXIT                                                     
  143    28    >   ISSET_ISEMPTY_DIM_OBJ                         0          !5, 'l'
         29      > JMPZ                                                     ~37, ->46
  144    30    >   ECHO                                                     '%0AUnderstood+paper+sizes%3A%0A'
  146    31        INIT_FCALL                                               'array_keys'
         32        FETCH_STATIC_PROP_R          unknown             ~38     'PAPER_SIZES'
         33        SEND_VAL                                                 ~38
         34        DO_ICALL                                         $39     
         35      > FE_RESET_R                                       $40     $39, ->44
         36    > > FE_FETCH_R                                               $40, !6, ->44
  147    37    >   INIT_FCALL                                               'mb_strtoupper'
         38        SEND_VAR                                                 !6
         39        DO_ICALL                                         $41     
         40        CONCAT                                           ~42     '++', $41
         41        CONCAT                                           ~43     ~42, '%0A'
         42        ECHO                                                     ~43
  146    43      > JMP                                                      ->36
         44    >   FE_FREE                                                  $40
  148    45      > EXIT                                                     
  150    46    >   FETCH_DIM_R                                      ~44     !5, 'filename'
         47        ASSIGN                                                   !7, ~44
  152    48        ISSET_ISEMPTY_DIM_OBJ                         0          !5, 'p'
         49      > JMPZ                                                     ~46, ->53
  153    50    >   FETCH_DIM_R                                      ~47     !5, 'p'
         51        ASSIGN                                                   !8, ~47
         52      > JMP                                                      ->55
  155    53    >   FETCH_CONSTANT                                   ~49     'DOMPDF_DEFAULT_PAPER_SIZE'
         54        ASSIGN                                                   !8, ~49
  157    55    >   ISSET_ISEMPTY_DIM_OBJ                         0          !5, 'o'
         56      > JMPZ                                                     ~51, ->60
  158    57    >   FETCH_DIM_R                                      ~52     !5, 'o'
         58        ASSIGN                                                   !9, ~52
         59      > JMP                                                      ->61
  160    60    >   ASSIGN                                                   !9, 'portrait'
  162    61    >   ISSET_ISEMPTY_DIM_OBJ                         0          !5, 'b'
         62      > JMPZ                                                     ~55, ->65
  163    63    >   FETCH_DIM_R                                      ~56     !5, 'b'
         64        ASSIGN                                                   !10, ~56
  165    65    >   ISSET_ISEMPTY_DIM_OBJ                         0          !5, 'f'
         66      > JMPZ                                                     ~58, ->70
  166    67    >   FETCH_DIM_R                                      ~59     !5, 'f'
         68        ASSIGN                                                   !11, ~59
         69      > JMP                                                      ->81
  168    70    >   IS_IDENTICAL                                             !7, '-'
         71      > JMPZ                                                     ~61, ->74
  169    72    >   ASSIGN                                                   !11, 'dompdf_out.pdf'
         73      > JMP                                                      ->81
  171    74    >   INIT_FCALL                                               'str_ireplace'
         75        SEND_VAL                                                 <array>
         76        SEND_VAL                                                 ''
         77        SEND_VAR                                                 !7
         78        DO_ICALL                                         $63     
         79        CONCAT                                           ~64     $63, '.pdf'
         80        ASSIGN                                                   !11, ~64
  174    81    >   ISSET_ISEMPTY_DIM_OBJ                         0          !5, 'v'
         82      > JMPZ                                                     ~66, ->84
  175    83    >   ASSIGN                                                   !0, <true>
  177    84    >   ISSET_ISEMPTY_DIM_OBJ                         0          !5, 'd'
         85      > JMPZ                                                     ~68, ->88
  178    86    >   ASSIGN                                                   !0, <true>
  179    87        ASSIGN                                                   !1, <true>
  182    88    >   ISSET_ISEMPTY_DIM_OBJ                         0          !5, 't'
         89      > JMPZ                                                     ~71, ->108
  183    90    >   INIT_FCALL_BY_NAME                                       'split'
         91        SEND_VAL_EX                                              '%2C'
         92        CHECK_FUNC_ARG                                           
         93        FETCH_DIM_FUNC_ARG                               $72     !5, 't'
         94        SEND_FUNC_ARG                                            $72
         95        DO_FCALL                                      0  $73     
         96        ASSIGN                                                   !12, $73
  184    97        ASSIGN                                                   !13, <array>
  185    98      > FE_RESET_R                                       $76     !12, ->106
         99    > > FE_FETCH_R                                               $76, !14, ->106
  186   100    >   INIT_FCALL                                               'trim'
        101        SEND_VAR                                                 !14
        102        DO_ICALL                                         $77     
        103        ASSIGN_DIM                                               !13, $77
        104        OP_DATA                                                  1
  185   105      > JMP                                                      ->99
        106    >   FE_FREE                                                  $76
  187   107        ASSIGN                                                   !2, !13
  190   108    >   ASSIGN                                                   !15, <true>
  192   109      > JMP                                                      ->206
  196   110    >   FETCH_IS                                         ~81     '_GET'
        111        ISSET_ISEMPTY_DIM_OBJ                         0          ~81, 'input_file'
        112      > JMPZ                                                     ~82, ->120
  197   113    >   INIT_FCALL                                               'rawurldecode'
        114        FETCH_R                      global              ~83     '_GET'
        115        FETCH_DIM_R                                      ~84     ~83, 'input_file'
        116        SEND_VAL                                                 ~84
        117        DO_ICALL                                         $85     
        118        ASSIGN                                                   !7, $85
        119      > JMP                                                      ->124
  199   120    >   NEW                                              $87     'DOMPDF_Exception'
        121        SEND_VAL_EX                                              'An+input+file+is+required+%28i.e.+input_file+_GET+variable%29.'
        122        DO_FCALL                                      0          
        123      > THROW                                         0          $87
  201   124    >   FETCH_IS                                         ~89     '_GET'
        125        ISSET_ISEMPTY_DIM_OBJ                         0          ~89, 'paper'
        126      > JMPZ                                                     ~90, ->134
  202   127    >   INIT_FCALL                                               'rawurldecode'
        128        FETCH_R                      global              ~91     '_GET'
        129        FETCH_DIM_R                                      ~92     ~91, 'paper'
        130        SEND_VAL                                                 ~92
        131        DO_ICALL                                         $93     
        132        ASSIGN                                                   !8, $93
        133      > JMP                                                      ->136
  204   134    >   FETCH_CONSTANT                                   ~95     'DOMPDF_DEFAULT_PAPER_SIZE'
        135        ASSIGN                                                   !8, ~95
  206   136    >   FETCH_IS                                         ~97     '_GET'
        137        ISSET_ISEMPTY_DIM_OBJ                         0          ~97, 'orientation'
        138      > JMPZ                                                     ~98, ->146
  207   139    >   INIT_FCALL                                               'rawurldecode'
        140        FETCH_R                      global              ~99     '_GET'
        141        FETCH_DIM_R                                      ~100    ~99, 'orientation'
        142        SEND_VAL                                                 ~100
        143        DO_ICALL                                         $101    
        144        ASSIGN                                                   !9, $101
        145      > JMP                                                      ->147
  209   146    >   ASSIGN                                                   !9, 'portrait'
  211   147    >   FETCH_IS                                         ~104    '_GET'
        148        ISSET_ISEMPTY_DIM_OBJ                         0          ~104, 'base_path'
        149      > JMPZ                                                     ~105, ->158
  212   150    >   INIT_FCALL                                               'rawurldecode'
        151        FETCH_R                      global              ~106    '_GET'
        152        FETCH_DIM_R                                      ~107    ~106, 'base_path'
        153        SEND_VAL                                                 ~107
        154        DO_ICALL                                         $108    
        155        ASSIGN                                                   !10, $108
  213   156        CONCAT                                           ~110    !10, !7
        157        ASSIGN                                                   !7, ~110
  216   158    >   FETCH_IS                                         ~112    '_GET'
        159        ISSET_ISEMPTY_DIM_OBJ                         0          ~112, 'options'
        160      > JMPZ                                                     ~113, ->164
  217   161    >   FETCH_R                      global              ~114    '_GET'
        162        FETCH_DIM_R                                      ~115    ~114, 'options'
        163        ASSIGN                                                   !4, ~115
  220   164    >   INIT_FCALL_BY_NAME                                       'explode_url'
        165        SEND_VAR_EX                                              !7
        166        DO_FCALL                                      0  $117    
        167        ASSIGN                                                   !16, $117
  223   168        FETCH_DIM_R                                      ~119    !16, 'protocol'
        169        IS_EQUAL                                         ~120    ~119, ''
        170      > JMPNZ_EX                                         ~120    ~120, ->174
        171    >   FETCH_DIM_R                                      ~121    !16, 'protocol'
        172        IS_IDENTICAL                                     ~122    ~121, 'file%3A%2F%2F'
        173        BOOL                                             ~120    ~122
        174    > > JMPZ                                                     ~120, ->193
  224   175    >   INIT_FCALL                                               'realpath'
        176        SEND_VAR                                                 !7
        177        DO_ICALL                                         $123    
        178        ASSIGN                                                   !7, $123
  225   179        INIT_FCALL                                               'strpos'
        180        SEND_VAR                                                 !7
        181        FETCH_CONSTANT                                   ~125    'DOMPDF_CHROOT'
        182        SEND_VAL                                                 ~125
        183        DO_ICALL                                         $126    
        184        IS_NOT_IDENTICAL                                         $126, 0
        185      > JMPZ                                                     ~127, ->193
  226   186    >   NEW                                              $128    'DOMPDF_Exception'
        187        ROPE_INIT                                     3  ~130    'Permission+denied+on+'
        188        ROPE_ADD                                      1  ~130    ~130, !7
        189        ROPE_END                                      2  ~129    ~130, '.+The+file+could+not+be+found+under+the+directory+specified+by+DOMPDF_CHROOT.'
        190        SEND_VAL_EX                                              ~129
        191        DO_FCALL                                      0          
        192      > THROW                                         0          $128
  230   193    >   FETCH_DIM_R                                      ~133    !16, 'protocol'
        194        IS_IDENTICAL                                             ~133, 'php%3A%2F%2F'
        195      > JMPZ                                                     ~134, ->203
  231   196    >   NEW                                              $135    'DOMPDF_Exception'
        197        ROPE_INIT                                     3  ~137    'Permission+denied+on+'
        198        ROPE_ADD                                      1  ~137    ~137, !7
        199        ROPE_END                                      2  ~136    ~137, '.+This+script+does+not+allow+PHP+streams.'
        200        SEND_VAL_EX                                              ~136
        201        DO_FCALL                                      0          
        202      > THROW                                         0          $135
  234   203    >   ASSIGN                                                   !11, 'dompdf_out.pdf'
  235   204        ASSIGN                                                   !15, <false>
  237   205      > JMP                                                      ->206
  240   206    >   NEW                                              $142    'DOMPDF'
        207        DO_FCALL                                      0          
        208        ASSIGN                                                   !17, $142
  242   209        IS_IDENTICAL                                             !7, '-'
        210      > JMPZ                                                     ~145, ->229
  243   211    >   ASSIGN                                                   !18, ''
  244   212      > JMP                                                      ->219
  245   213    >   INIT_FCALL                                               'fread'
        214        FETCH_CONSTANT                                   ~147    'STDIN'
        215        SEND_VAL                                                 ~147
        216        SEND_VAL                                                 4096
        217        DO_ICALL                                         $148    
        218        ASSIGN_OP                                     8          !18, $148
  244   219    >   INIT_FCALL                                               'feof'
        220        FETCH_CONSTANT                                   ~150    'STDIN'
        221        SEND_VAL                                                 ~150
        222        DO_ICALL                                         $151    
        223        BOOL_NOT                                         ~152    $151
        224      > JMPNZ                                                    ~152, ->213
  247   225    >   INIT_METHOD_CALL                                         !17, 'load_html'
        226        SEND_VAR_EX                                              !18
        227        DO_FCALL                                      0          
        228      > JMP                                                      ->232
  250   229    >   INIT_METHOD_CALL                                         !17, 'load_html_file'
        230        SEND_VAR_EX                                              !7
        231        DO_FCALL                                      0          
  252   232    >   ISSET_ISEMPTY_CV                                         !10
        233      > JMPZ                                                     ~155, ->237
  253   234    >   INIT_METHOD_CALL                                         !17, 'set_base_path'
        235        SEND_VAR_EX                                              !10
        236        DO_FCALL                                      0          
  256   237    >   INIT_METHOD_CALL                                         !17, 'set_paper'
        238        SEND_VAR_EX                                              !8
        239        SEND_VAR_EX                                              !9
        240        DO_FCALL                                      0          
  258   241        INIT_METHOD_CALL                                         !17, 'render'
        242        DO_FCALL                                      0          
  260   243      > JMPZ                                                     !0, ->259
  261   244    >   BIND_GLOBAL                                              !19, '_dompdf_warnings'
  262   245      > FE_RESET_R                                       $159    !19, ->250
        246    > > FE_FETCH_R                                               $159, !20, ->250
  263   247    >   CONCAT                                           ~160    !20, '%0A'
        248        ECHO                                                     ~160
  262   249      > JMP                                                      ->246
        250    >   FE_FREE                                                  $159
  264   251        INIT_METHOD_CALL                                         !17, 'get_canvas'
        252        DO_FCALL                                      0  $161    
        253        INIT_METHOD_CALL                                         $161, 'get_cpdf'
        254        DO_FCALL                                      0  $162    
        255        FETCH_OBJ_R                                      ~163    $162, 'messages'
        256        ECHO                                                     ~163
  265   257        INIT_FCALL                                               'flush'
        258        DO_ICALL                                                 
  268   259    > > JMPZ                                                     !15, ->318
  271   260    >   INIT_FCALL                                               'strtolower'
        261        FETCH_CONSTANT                                   ~165    'DOMPDF_PDF_BACKEND'
        262        SEND_VAL                                                 ~165
        263        DO_ICALL                                         $166    
        264        IS_IDENTICAL                                             $166, 'gd'
        265      > JMPZ                                                     ~167, ->272
  272   266    >   INIT_FCALL                                               'str_replace'
        267        SEND_VAL                                                 '.pdf'
        268        SEND_VAL                                                 '.png'
        269        SEND_VAR                                                 !11
        270        DO_ICALL                                         $168    
        271        ASSIGN                                                   !11, $168
  274   272    >   INIT_FCALL_BY_NAME                                       'explode_url'
        273        SEND_VAR_EX                                              !11
        274        DO_FCALL                                      0  $170    
        275        FETCH_LIST_R                                     $171    $170, 0
        276        ASSIGN                                                   !21, $171
        277        FETCH_LIST_R                                     $173    $170, 1
        278        ASSIGN                                                   !22, $173
        279        FETCH_LIST_R                                     $175    $170, 2
        280        ASSIGN                                                   !23, $175
        281        FETCH_LIST_R                                     $177    $170, 3
        282        ASSIGN                                                   !7, $177
        283        FREE                                                     $170
  275   284        IS_NOT_EQUAL                                             !21, ''
        285      > JMPZ                                                     ~179, ->287
  276   2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
269.34 ms | 1431 KiB | 42 Q