3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cert_splitwrapped_print($customtext, $left_margin, $face, $fontsize, $height, $max_lines, $mode = 'html') { $mode = strtolower($mode); if ($mode != 'html'){ $mode = 'plaintext'; } $ary_customtext = preg_split('/$\R?^/m', trim($customtext)); //only allow 3 lines for this cert, it allows some html codes specified in for ($i = 0;$i < $max_lines;++$i, $height+= $fontsize) { if (isset($ary_customtext[$i])) { $text = utf8_decode(preg_replace('/(\r|\n)/', '', $ary_customtext[$i])); cert_printtext($left_margin, $height, 'C', $face, '', 20, ''); if ($mode == 'html'){ $pdf->SetLeftMargin($left_margin); $pdf->WriteHTML($text); }else if ($mode == 'plaintext'){ cert_printtext($left_margin, $height, 'C', $face, '', $fontsize, $text); } } } return array('mode'=>$mode, 'last_height'=>$height, 'lines_printed'=>$i); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0170.00316.63
8.3.50.0160.00321.91
8.3.40.0100.00718.71
8.3.30.0070.00718.78
8.3.20.0030.00520.30
8.3.10.0070.00023.69
8.3.00.0100.00519.13
8.2.180.0130.00318.04
8.2.170.0150.00022.96
8.2.160.0200.00020.39
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00722.09
8.2.110.0060.00322.24
8.2.100.0090.00317.59
8.2.90.0040.00419.09
8.2.80.0060.00317.97
8.2.70.0060.00317.25
8.2.60.0120.00017.64
8.2.50.0060.00318.07
8.2.40.0040.00418.03
8.2.30.0040.00417.96
8.2.20.0000.00717.48
8.2.10.0050.00317.87
8.2.00.0030.00517.63
8.1.280.0140.00425.92
8.1.270.0040.00423.69
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.83
8.1.230.0130.00018.95
8.1.220.0030.00617.74
8.1.210.0050.00318.77
8.1.200.0000.01017.11
8.1.190.0040.00417.40
8.1.180.0050.00318.10
8.1.170.0040.00418.53
8.1.160.0080.00021.97
8.1.150.0070.00418.41
8.1.140.0070.00017.34
8.1.130.0000.00817.84
8.1.120.0080.00017.38
8.1.110.0000.00817.34
8.1.100.0040.00417.26
8.1.90.0030.00517.33
8.1.80.0070.00017.39
8.1.70.0070.00017.32
8.1.60.0030.00617.48
8.1.50.0000.00717.47
8.1.40.0000.00817.42
8.1.30.0040.00417.47
8.1.20.0050.00317.51
8.1.10.0040.00417.39
8.1.00.0040.00417.41
8.0.300.0000.00718.77
8.0.290.0040.00417.05
8.0.280.0030.00318.45
8.0.270.0000.00717.06
8.0.260.0040.00416.77
8.0.250.0000.00716.75
8.0.240.0050.00316.90
8.0.230.0030.00316.91
8.0.220.0000.00716.81
8.0.210.0070.00016.73
8.0.200.0000.00616.88
8.0.190.0040.00416.86
8.0.180.0000.00916.79
8.0.170.0000.00816.83
8.0.160.0000.00716.66
8.0.150.0000.00716.64
8.0.140.0070.00016.71
8.0.130.0050.00013.20
8.0.120.0040.00416.65
8.0.110.0040.00416.62
8.0.100.0000.00716.80
8.0.90.0000.00716.77
8.0.80.0140.00316.80
8.0.70.0040.00416.64
8.0.60.0050.00316.69
8.0.50.0000.00716.65
8.0.30.0100.00816.87
8.0.20.0100.00817.40
8.0.10.0000.00716.78
8.0.00.0080.01016.62
7.4.330.0000.00715.00
7.4.320.0030.00316.50
7.4.300.0030.00316.38
7.4.290.0030.00316.39
7.4.280.0030.00316.45
7.4.270.0030.00316.41
7.4.260.0000.00716.40
7.4.250.0040.00416.36
7.4.240.0020.00616.48
7.4.230.0030.00616.40
7.4.220.0140.00416.52
7.4.210.0070.01016.49
7.4.200.0030.00316.38
7.4.190.0000.00716.56
7.4.160.0130.00616.28
7.4.150.0090.00917.40
7.4.140.0150.01517.86
7.4.130.0060.01416.40
7.4.120.0050.01116.30
7.4.110.0220.00316.36
7.4.100.0100.00716.47
7.4.90.0070.01016.45
7.4.80.0120.00619.39
7.4.70.0030.01316.45
7.4.60.0120.00916.26
7.4.50.0030.00516.45
7.4.40.0060.00922.77
7.4.30.0060.00916.25
7.4.00.0090.00614.50
7.3.330.0020.00213.02
7.3.320.0030.00313.21
7.3.310.0030.00316.23
7.3.300.0070.00016.14
7.3.290.0000.01516.21
7.3.280.0080.00916.22
7.3.270.0130.01017.40
7.3.260.0060.01516.24
7.3.250.0130.00616.19
7.3.240.0120.00416.21
7.3.230.0070.01416.41
7.3.210.0030.01316.33
7.3.200.0130.00419.39
7.3.190.0080.00816.25
7.3.180.0060.00916.37
7.3.170.0030.01216.51
7.3.160.0060.00916.27
7.3.120.0130.00314.41
7.2.330.0130.00316.20
7.2.320.0040.01516.38
7.2.310.0130.01016.31
7.2.300.0130.00316.51
7.2.290.0110.00616.51
7.2.60.0070.00716.77
7.2.50.0090.00316.64
7.2.00.0050.00519.27
7.1.200.0100.00315.52
7.1.100.0000.01217.91
7.1.70.0100.00316.68
7.1.60.0100.01419.33
7.1.50.0100.00716.90
7.1.00.0100.06722.37
7.0.200.0060.00616.60
7.0.140.0030.07322.07
7.0.60.0030.04019.98
7.0.50.0000.08017.90
7.0.40.0130.07320.05
7.0.30.0500.05320.09
7.0.20.0330.06020.10
7.0.10.0030.09020.06
7.0.00.0070.05320.06
5.6.280.0030.07020.92
5.6.210.0100.07320.72
5.6.200.0130.04718.16
5.6.190.0100.08720.57
5.6.180.0270.07320.61
5.6.170.0300.07720.55
5.6.160.0030.08320.54
5.6.150.0030.07318.14
5.6.140.0100.04318.18
5.6.130.0130.07018.18
5.6.120.0130.04321.05
5.6.110.0000.04721.02
5.6.100.0130.04721.00
5.6.90.0100.08021.01
5.6.80.0130.06020.41
5.6.70.3200.04020.53
5.5.350.0030.08020.54
5.5.340.0170.06317.99
5.5.330.0130.06020.40
5.5.320.0300.05320.52
5.5.310.0400.06320.21
5.5.300.0070.08717.95
5.5.290.0030.05018.00
5.5.280.0030.05320.67
5.5.270.0030.04020.77
5.5.260.0100.08020.84
5.5.250.0000.06320.60
5.5.240.0270.05720.18
5.4.450.0900.06019.48
5.4.440.0930.05319.48
5.4.430.0730.06319.38
5.4.420.0670.00019.38
5.4.410.0170.07719.05
5.4.400.1170.06018.71
5.4.390.0170.05018.57
5.4.380.0270.05018.54
5.4.370.0130.03318.56
5.4.360.0070.05318.84
5.4.350.0040.03912.03
5.4.340.0110.03812.03
5.4.320.0080.03512.52
5.4.310.0080.03612.51
5.4.300.0100.03112.52
5.4.290.0060.03912.52
5.4.280.0090.03612.41
5.4.270.0070.05512.41
5.4.260.0050.03812.41
5.4.250.0070.03612.41
5.4.240.0070.03912.41
5.4.230.0030.04012.41
5.4.220.0060.03612.40
5.4.210.0060.03512.40
5.4.200.0070.03612.40
5.4.190.0140.04612.39
5.4.180.0170.04212.39
5.4.170.0150.04512.41
5.4.160.0130.04712.40
5.4.150.0150.04412.39
5.4.140.0170.04112.08
5.4.130.0190.03912.07
5.4.120.0170.04112.02
5.4.110.0130.04412.02
5.4.100.0160.04212.02
5.4.90.0150.04312.02
5.4.80.0110.04612.02
5.4.70.0300.06012.02
5.4.60.0130.04412.02
5.4.50.0200.03712.01
5.4.40.0210.03812.00
5.4.30.0320.08712.00
5.4.20.0160.04111.99
5.4.10.0150.04211.99
5.4.00.0340.08611.48
5.3.290.0040.03912.80
5.3.280.0080.03612.71
5.3.270.0160.04712.73
5.3.260.0170.04812.72
5.3.250.0470.07512.72
5.3.240.0180.04212.72
5.3.230.0210.04212.71
5.3.220.0200.04012.68
5.3.210.0170.04412.68
5.3.200.0200.04012.68
5.3.190.0180.04412.68
5.3.180.0140.04512.67
5.3.170.0140.04712.67
5.3.160.0280.06412.67
5.3.150.0190.04212.67
5.3.140.0140.04512.66
5.3.130.0200.04012.66
5.3.120.0150.04512.66
5.3.110.0180.04712.66
5.3.100.0200.04312.13
5.3.90.0310.06212.12
5.3.80.0160.04612.10
5.3.70.0250.06912.10
5.3.60.0160.04812.09
5.3.50.0220.04112.04
5.3.40.0170.04812.04
5.3.30.0350.08812.00
5.3.20.0230.03711.78
5.3.10.0270.06111.75
5.3.00.0130.04511.73
5.2.170.0150.0349.23
5.2.160.0200.0579.23
5.2.150.0120.0369.23
5.2.140.0100.0379.23
5.2.130.0100.0369.19
5.2.120.0080.0389.19
5.2.110.0140.0349.20
5.2.100.0100.0369.20
5.2.90.0120.0359.20
5.2.80.0290.0529.18
5.2.70.0130.0359.18
5.2.60.0130.0379.14
5.2.50.0410.0689.11
5.2.40.0120.0369.09
5.2.30.0090.0379.05
5.2.20.0160.0319.05
5.2.10.0140.0348.95
5.2.00.0170.0338.80
5.1.60.0110.0298.10
5.1.50.0100.0328.09
5.1.40.0180.0308.08
5.1.30.0120.0328.42
5.1.20.0120.0338.46
5.1.10.0180.0308.17
5.1.00.0140.0318.17
5.0.50.0100.0256.67
5.0.40.0140.0276.51
5.0.30.0130.0396.33
5.0.20.0100.0286.30
5.0.10.0140.0226.27
5.0.00.0100.0396.27
4.4.90.0120.0224.78
4.4.80.0140.0184.76
4.4.70.0090.0194.75
4.4.60.0250.0664.75
4.4.50.0140.0164.77
4.4.40.0130.0284.70
4.4.30.0100.0234.76
4.4.20.0090.0204.84
4.4.10.0110.0174.85
4.4.00.0100.0274.76
4.3.110.0110.0154.67
4.3.100.0050.0224.66
4.3.90.0080.0184.64
4.3.80.0100.0294.58
4.3.70.0090.0184.63
4.3.60.0120.0134.63
4.3.50.0120.0154.63
4.3.40.0190.1104.54
4.3.30.0080.0153.31
4.3.20.0040.0223.30
4.3.10.0050.0203.26
4.3.00.0070.0239.05

preferences:
47.4 ms | 401 KiB | 5 Q