3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Création d'une image de 300x150 pixels $im = imagecreatetruecolor(300, 150); $black = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($im, 255, 255, 255); // Définit l'arrière-plan en blanc imagefilledrectangle($im, 0, 0, 299, 299, $white); // Chemin vers le fichier de police $font = './arial.ttf'; // Tout d'abord, nous créons notre rectangle entourant notre premier texte $bbox = imagettfbbox(10, 45, $font, 'Powered by PHP ' . phpversion()); // Nos coordonnées en X et en Y $x = $bbox[0] + (imagesx($im) / 2) - ($bbox[4] / 2) - 25; $y = $bbox[1] + (imagesy($im) / 2) - ($bbox[5] / 2) - 5; // Dessin du texte imagettftext($im, 10, 45, $x, $y, $black, $font, 'Powered by PHP ' . phpversion()); // Nous créons notre rectangle entourant notre second texte $bbox = imagettfbbox(10, 45, $font, 'and Zend Engine ' . zend_version()); // Définit les coordonnées afin que le second text suive le premier $x = $bbox[0] + (imagesx($im) / 2) - ($bbox[4] / 2) + 10; $y = $bbox[1] + (imagesy($im) / 2) - ($bbox[5] / 2) - 5; // Dessin du texte imagettftext($im, 10, 45, $x, $y, $black, $font, 'and Zend Engine ' . zend_version()); // Affichage vers le navigateur header('Content-Type: image/png'); imagepng($im); imagedestroy($im); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nb99v
function name:  (null)
number of ops:  128
compiled vars:  !0 = $im, !1 = $black, !2 = $white, !3 = $font, !4 = $bbox, !5 = $x, !6 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'imagecreatetruecolor'
          1        SEND_VAL_EX                                              300
          2        SEND_VAL_EX                                              150
          3        DO_FCALL                                      0  $7      
          4        ASSIGN                                                   !0, $7
    4     5        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
          6        SEND_VAR_EX                                              !0
          7        SEND_VAL_EX                                              0
          8        SEND_VAL_EX                                              0
          9        SEND_VAL_EX                                              0
         10        DO_FCALL                                      0  $9      
         11        ASSIGN                                                   !1, $9
    5    12        INIT_FCALL_BY_NAME                                       'imagecolorallocate'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAL_EX                                              255
         15        SEND_VAL_EX                                              255
         16        SEND_VAL_EX                                              255
         17        DO_FCALL                                      0  $11     
         18        ASSIGN                                                   !2, $11
    8    19        INIT_FCALL_BY_NAME                                       'imagefilledrectangle'
         20        SEND_VAR_EX                                              !0
         21        SEND_VAL_EX                                              0
         22        SEND_VAL_EX                                              0
         23        SEND_VAL_EX                                              299
         24        SEND_VAL_EX                                              299
         25        SEND_VAR_EX                                              !2
         26        DO_FCALL                                      0          
   11    27        ASSIGN                                                   !3, '.%2Farial.ttf'
   14    28        INIT_FCALL_BY_NAME                                       'imagettfbbox'
         29        SEND_VAL_EX                                              10
         30        SEND_VAL_EX                                              45
         31        SEND_VAR_EX                                              !3
         32        INIT_FCALL                                               'phpversion'
         33        DO_ICALL                                         $15     
         34        CONCAT                                           ~16     'Powered+by+PHP+', $15
         35        SEND_VAL_EX                                              ~16
         36        DO_FCALL                                      0  $17     
         37        ASSIGN                                                   !4, $17
   17    38        FETCH_DIM_R                                      ~19     !4, 0
         39        INIT_FCALL_BY_NAME                                       'imagesx'
         40        SEND_VAR_EX                                              !0
         41        DO_FCALL                                      0  $20     
         42        DIV                                              ~21     $20, 2
         43        ADD                                              ~22     ~19, ~21
         44        FETCH_DIM_R                                      ~23     !4, 4
         45        DIV                                              ~24     ~23, 2
         46        SUB                                              ~25     ~22, ~24
         47        SUB                                              ~26     ~25, 25
         48        ASSIGN                                                   !5, ~26
   18    49        FETCH_DIM_R                                      ~28     !4, 1
         50        INIT_FCALL_BY_NAME                                       'imagesy'
         51        SEND_VAR_EX                                              !0
         52        DO_FCALL                                      0  $29     
         53        DIV                                              ~30     $29, 2
         54        ADD                                              ~31     ~28, ~30
         55        FETCH_DIM_R                                      ~32     !4, 5
         56        DIV                                              ~33     ~32, 2
         57        SUB                                              ~34     ~31, ~33
         58        SUB                                              ~35     ~34, 5
         59        ASSIGN                                                   !6, ~35
   21    60        INIT_FCALL_BY_NAME                                       'imagettftext'
         61        SEND_VAR_EX                                              !0
         62        SEND_VAL_EX                                              10
         63        SEND_VAL_EX                                              45
         64        SEND_VAR_EX                                              !5
         65        SEND_VAR_EX                                              !6
         66        SEND_VAR_EX                                              !1
         67        SEND_VAR_EX                                              !3
         68        INIT_FCALL                                               'phpversion'
         69        DO_ICALL                                         $37     
         70        CONCAT                                           ~38     'Powered+by+PHP+', $37
         71        SEND_VAL_EX                                              ~38
         72        DO_FCALL                                      0          
   24    73        INIT_FCALL_BY_NAME                                       'imagettfbbox'
         74        SEND_VAL_EX                                              10
         75        SEND_VAL_EX                                              45
         76        SEND_VAR_EX                                              !3
         77        INIT_FCALL                                               'zend_version'
         78        DO_ICALL                                         $40     
         79        CONCAT                                           ~41     'and+Zend+Engine+', $40
         80        SEND_VAL_EX                                              ~41
         81        DO_FCALL                                      0  $42     
         82        ASSIGN                                                   !4, $42
   27    83        FETCH_DIM_R                                      ~44     !4, 0
         84        INIT_FCALL_BY_NAME                                       'imagesx'
         85        SEND_VAR_EX                                              !0
         86        DO_FCALL                                      0  $45     
         87        DIV                                              ~46     $45, 2
         88        ADD                                              ~47     ~44, ~46
         89        FETCH_DIM_R                                      ~48     !4, 4
         90        DIV                                              ~49     ~48, 2
         91        SUB                                              ~50     ~47, ~49
         92        ADD                                              ~51     ~50, 10
         93        ASSIGN                                                   !5, ~51
   28    94        FETCH_DIM_R                                      ~53     !4, 1
         95        INIT_FCALL_BY_NAME                                       'imagesy'
         96        SEND_VAR_EX                                              !0
         97        DO_FCALL                                      0  $54     
         98        DIV                                              ~55     $54, 2
         99        ADD                                              ~56     ~53, ~55
        100        FETCH_DIM_R                                      ~57     !4, 5
        101        DIV                                              ~58     ~57, 2
        102        SUB                                              ~59     ~56, ~58
        103        SUB                                              ~60     ~59, 5
        104        ASSIGN                                                   !6, ~60
   31   105        INIT_FCALL_BY_NAME                                       'imagettftext'
        106        SEND_VAR_EX                                              !0
        107        SEND_VAL_EX                                              10
        108        SEND_VAL_EX                                              45
        109        SEND_VAR_EX                                              !5
        110        SEND_VAR_EX                                              !6
        111        SEND_VAR_EX                                              !1
        112        SEND_VAR_EX                                              !3
        113        INIT_FCALL                                               'zend_version'
        114        DO_ICALL                                         $62     
        115        CONCAT                                           ~63     'and+Zend+Engine+', $62
        116        SEND_VAL_EX                                              ~63
        117        DO_FCALL                                      0          
   34   118        INIT_FCALL                                               'header'
        119        SEND_VAL                                                 'Content-Type%3A+image%2Fpng'
        120        DO_ICALL                                                 
   36   121        INIT_FCALL_BY_NAME                                       'imagepng'
        122        SEND_VAR_EX                                              !0
        123        DO_FCALL                                      0          
   37   124        INIT_FCALL_BY_NAME                                       'imagedestroy'
        125        SEND_VAR_EX                                              !0
        126        DO_FCALL                                      0          
   38   127      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.47 ms | 1404 KiB | 19 Q