3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* filename: amazon_search_layout.php created: 7/17/2002, © 2002 php9.com Calin Uioreanu descripton: display template for Amazon Search API */ // number of Amazon search teaser results to display if ($this->iNumResults >= AWS_NUMBER_OF_RESULTS) { return; // silent } $sProductUrl = $sBookUrl; $sProductUrl = $sProductUrl .'/'. ASSOCIATE_ID; global $arTeaser; $sTdColor = $arTeaser[(int) $this->iNumResults]; // if Amazon returned an empty Image (1x1), do not display the HTML code $arSize = getimagesize ($IMAGEURLSMALL); if ((int) $arSize[1] == 1 ) { $sImageUrl = ''; } else { $sImageUrl = '<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><img src="'. $IMAGEURLSMALL .'" alt="'. $PRODUCTNAME .'" border="0" /></a>'; } $iOurPrice = (int) str_replace('$', '', $OURPRICE); $iListPrice = (int) str_replace('$', '', $LISTPRICE); if ($iOurPrice && $iListPrice) { $iDiscount = ($iListPrice - $iOurPrice) / $iListPrice; $iDiscount = (int) ($iDiscount*100); if ($iDiscount > 0) { $sDiscount = ', this means <font color="red">' . $iDiscount .'%</font> off!'; } } if ($AUTHORS) { $sAuthors = ' by ' . $AUTHORS; } $OURPRICE = '$' . number_format((float) str_replace('$', '', $OURPRICE), 2); $LISTPRICE = '$' . number_format((float) str_replace('$', '', $LISTPRICE), 2); $USEDPRICE = '$' . number_format((float) str_replace('$', '', $USEDPRICE), 2); echo '<table border="0" cellpadding="2" cellspacing="0" width="'.AWS_TABLE_WIDTH.'">', '<tr><td bgcolor="'.$sTdColor.'" width="85%">', '<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><b>'. $PRODUCTNAME .'</b></a>', '<font size="-2">', $sAuthors, '<br />List Price: <b><font color="red">'. $LISTPRICE .'</font></b>', '&nbsp; &nbsp; Amazon Price: <b><font color="red">'. $OURPRICE .'</font></b>', $sDiscount, '&nbsp; &nbsp; Used Price: <b><font color="red">'. $USEDPRICE .'</font></b>', '&nbsp; &nbsp; Publisher: ', $MANUFACTURER, ' ('. $RELEASEDATE .')', '<br />Buy from <a href="'. $sProductUrl .'"><b><font color="red">Amazon.com!</font></b></a>', '&nbsp;<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><b><font color="red">our Top Books shop!</font></b></a>', '&nbsp;<a href="http://shop.php9.com/books.php/Mode/product/AsinSearch/'. $ASIN .'/name/'. rawurlencode($PRODUCTNAME) .'"><b><font color="red">our Tech Books shop!</font></b></a>', '</td><td bgcolor="'.$sTdColor.'" width="15%">', $sImageUrl, '</td></tr>', '</table>' ; ?> <!-- Script generated with the Amazon PHP API from php9.com Try it here: http://www.php9.com/amazon.php //-->

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.0150.00018.20
8.3.50.0150.00717.93
8.3.40.0070.00718.74
8.3.30.0140.00018.67
8.3.20.0040.00420.30
8.3.10.0040.00420.51
8.3.00.0040.00421.90
8.2.180.0040.01416.50
8.2.170.0160.00322.96
8.2.160.0040.01122.20
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00821.12
8.2.120.0080.00026.35
8.2.110.0030.00622.08
8.2.100.0040.00717.72
8.2.90.0000.00819.27
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0080.00017.80
8.2.50.0060.00318.09
8.2.40.0030.00620.54
8.2.30.0040.00419.37
8.2.20.0000.00817.75
8.2.10.0000.00817.93
8.2.00.0030.00517.97
8.1.280.0110.00425.92
8.1.270.0000.00822.06
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0070.00720.54
8.1.230.0080.00420.98
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.36
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0030.00518.57
8.1.160.0060.00320.57
8.1.150.0040.00418.84
8.1.140.0050.00319.46
8.1.130.0030.00317.70
8.1.120.0040.00417.29
8.1.110.0040.00417.23
8.1.100.0000.00817.38
8.1.90.0000.00817.25
8.1.80.0040.00417.43
8.1.70.0040.00417.42
8.1.60.0000.00917.40
8.1.50.0000.00817.54
8.1.40.0040.00417.48
8.1.30.0000.00817.55
8.1.20.0030.00517.49
8.1.10.0000.00817.64
8.1.00.0030.00617.50
8.0.300.0040.00418.77
8.0.290.0050.00316.63
8.0.280.0000.00718.31
8.0.270.0030.00317.14
8.0.260.0030.00317.27
8.0.250.0030.00317.00
8.0.240.0000.00817.03
8.0.230.0000.00716.92
8.0.220.0030.00316.91
8.0.210.0030.00316.94
8.0.200.0040.00417.02
8.0.190.0040.00416.99
8.0.180.0000.00716.97
8.0.170.0000.00816.96
8.0.160.0040.00416.97
8.0.150.0040.00416.86
8.0.140.0040.00416.77
8.0.130.0050.00513.33
8.0.120.0080.00016.95
8.0.110.0030.00516.93
8.0.100.0050.00316.98
8.0.90.0000.00816.99
8.0.80.0040.01216.94
8.0.70.0040.00416.78
8.0.60.0000.00816.78
8.0.50.0000.00716.89
8.0.30.0080.01317.15
8.0.20.0140.00817.40
8.0.10.0070.00016.95
8.0.00.0100.01016.67
7.4.330.0000.00516.77
7.4.320.0000.00716.60
7.4.300.0030.00316.65
7.4.290.0030.00316.59
7.4.280.0060.00316.41
7.4.270.0000.00716.61
7.4.260.0030.00516.56
7.4.250.0050.00316.61
7.4.240.0070.00016.64
7.4.230.0000.00716.64
7.4.220.0110.00716.71
7.4.210.0080.00516.54
7.4.200.0040.00416.62
7.4.160.0090.00616.45
7.4.150.0050.01417.40
7.4.140.0100.01017.86
7.4.130.0120.00716.50
7.4.120.0110.00716.46
7.4.110.0140.00416.72
7.4.100.0150.00316.63
7.4.90.0120.00916.43
7.4.80.0120.00619.39
7.4.70.0070.01016.36
7.4.60.0060.01016.61
7.4.50.0070.00716.45
7.4.40.0030.01416.43
7.4.30.0100.01116.44
7.4.10.0070.00815.11
7.4.00.0090.00815.05
7.3.330.0050.00013.22
7.3.320.0050.00013.25
7.3.310.0080.00016.40
7.3.300.0000.00716.30
7.3.290.0030.00316.36
7.3.280.0080.00716.29
7.3.270.0120.00917.40
7.3.260.0130.00516.42
7.3.250.0080.01016.33
7.3.240.0110.00616.49
7.3.230.0090.01216.39
7.3.210.0170.00016.47
7.3.200.0080.00916.66
7.3.190.0170.00016.29
7.3.180.0210.00016.41
7.3.170.0080.00916.31
7.3.160.0100.00616.31
7.3.130.0060.01214.43
7.3.120.0090.00914.92
7.3.110.0070.01214.89
7.3.100.0090.00814.77
7.3.90.0060.01114.91
7.3.80.0010.01115.15
7.3.70.0040.00714.81
7.3.60.0040.01114.67
7.3.50.0050.00514.78
7.3.40.0000.01014.88
7.3.30.0050.00614.89
7.3.20.0050.01016.51
7.3.10.0150.00216.54
7.3.00.0100.00516.66
7.2.330.0090.00916.82
7.2.320.0030.01416.79
7.2.310.0030.01316.67
7.2.300.0030.01316.77
7.2.290.0040.01316.49
7.2.260.0070.01314.68
7.2.250.0100.00815.00
7.2.240.0030.01414.99
7.2.230.0130.00615.11
7.2.220.0100.00714.91
7.2.210.0080.00714.89
7.2.200.0090.00615.00
7.2.190.0070.00715.03
7.2.180.0060.00614.97
7.2.170.0060.00914.99
7.2.160.0000.01214.78
7.2.150.0070.00316.64
7.2.140.0030.01116.66
7.2.130.0030.01016.79
7.2.120.0040.01416.64
7.2.110.0070.01016.83
7.2.100.0070.01416.96
7.2.90.0030.00716.91
7.2.80.0060.00916.82
7.2.70.0070.00716.91
7.2.60.0090.00516.89
7.2.50.0030.00916.80
7.2.40.0060.01116.75
7.2.30.0040.01216.87
7.2.20.0030.01016.68
7.2.10.0000.01616.72
7.2.00.0050.00717.88
7.1.330.0080.00715.51
7.1.320.0090.00815.49
7.1.310.0020.00915.54
7.1.300.0020.00815.64
7.1.290.0040.00915.62
7.1.280.0100.00415.38
7.1.270.0030.01015.62
7.1.260.0070.00915.54
7.1.250.0000.00815.48
7.1.240.0030.01215.35
7.1.230.0100.01015.69
7.1.220.0110.00015.44
7.1.210.0040.01115.53
7.1.200.0050.00915.67
7.1.190.0060.00315.78
7.1.180.0060.00615.65
7.1.170.0080.00415.47
7.1.160.0070.00715.59
7.1.150.0050.00515.43
7.1.140.0120.00415.39
7.1.130.0100.00315.39
7.1.120.0080.00315.57
7.1.110.0000.01315.31
7.1.100.0080.00516.76
7.1.90.0030.01315.54
7.1.80.0030.01315.73
7.1.70.0040.01116.24
7.1.60.0090.00817.31
7.1.50.0050.01216.27
7.1.40.0000.01015.21
7.1.30.0000.01415.68
7.1.20.0030.01015.43
7.1.10.0110.00415.58
7.1.00.0020.04519.01
7.0.330.0100.00315.35
7.0.320.0030.00915.27
7.0.310.0040.01115.00
7.0.300.0040.00715.36
7.0.290.0090.00615.33
7.0.280.0030.01015.25
7.0.270.0090.00615.36
7.0.260.0040.01115.32
7.0.250.0100.00315.43
7.0.240.0040.00715.16
7.0.230.0000.01415.19
7.0.220.0070.01015.02
7.0.210.0070.00715.21
7.0.200.0120.00114.98
7.0.190.0030.00815.06
7.0.180.0050.00315.38
7.0.170.0000.01315.16
7.0.160.0080.00015.00
7.0.150.0040.00415.03
7.0.140.0080.00415.34
7.0.130.0050.00515.36
7.0.120.0060.00615.28
7.0.110.0080.00415.34
7.0.100.0030.00515.10
7.0.90.0000.00915.23
7.0.80.0060.01015.43
7.0.70.0030.01315.26
7.0.60.0050.04018.35
7.0.50.0020.03016.54
7.0.40.0080.04516.72
7.0.30.0240.04016.80
7.0.20.0170.04416.84
7.0.10.0120.04716.63
7.0.00.0080.02016.72
5.6.400.0060.00613.98
5.6.390.0070.00714.34
5.6.380.0030.01013.82
5.6.370.0070.01014.36
5.6.360.0060.00614.39
5.6.350.0030.01314.23
5.6.340.0070.01014.30
5.6.330.0000.01214.16
5.6.320.0030.01313.87
5.6.310.0030.01214.09
5.6.300.0030.00714.34
5.6.290.0070.00414.31
5.6.280.0030.03017.70
5.6.270.0100.00314.06
5.6.260.0000.01013.99
5.6.250.0030.01213.96
5.6.240.0000.00814.05
5.6.230.0040.01114.45
5.6.220.0060.01014.03
5.6.210.0070.02317.25
5.6.200.0070.03316.23
5.6.190.0040.03117.24
5.6.180.0170.02517.32
5.6.170.0160.04017.30
5.6.160.0130.03917.12
5.6.150.0100.04216.09
5.6.140.0000.04516.17
5.6.130.0070.03016.18
5.6.120.0070.04017.65
5.6.110.0130.04117.61
5.6.100.0020.04717.55
5.6.90.0030.05217.45
5.6.80.0050.04317.31
5.6.70.0030.00914.29
5.6.60.0030.00614.15
5.6.50.0070.00714.14
5.6.40.0100.00314.33
5.6.30.0090.00613.73
5.6.20.0100.00613.85
5.6.10.0070.00714.32
5.6.00.0000.00814.36
5.5.380.0030.00614.15
5.5.370.0110.00013.93
5.5.360.0060.00314.16
5.5.350.0180.02217.15
5.5.340.0030.03816.06
5.5.330.0070.03217.18
5.5.320.0200.03017.13
5.5.310.0220.01817.14
5.5.300.0120.03716.00
5.5.290.0050.04516.08
5.5.280.0030.02617.61
5.5.270.0040.03417.48
5.5.260.0020.03017.45
5.5.250.0070.02217.13
5.5.240.0060.04017.11
5.5.230.0030.00813.98
5.5.220.0090.00613.98
5.5.210.0000.00814.04
5.5.200.0030.01014.15
5.5.190.0060.00314.05
5.5.180.0080.00413.92
5.5.170.0040.01113.92
5.5.160.0000.01313.78
5.5.150.0120.00614.02
5.5.140.0060.00913.59
5.5.130.0100.00314.10
5.5.120.0070.00713.98
5.5.110.0060.00614.03
5.5.100.0040.01113.64
5.5.90.0090.00613.82
5.5.80.0110.00014.07
5.5.70.0070.00714.02
5.5.60.0040.00713.75
5.5.50.0030.00913.96
5.5.40.0100.00314.13
5.5.30.0090.00614.26
5.5.20.0130.00013.99
5.5.10.0090.00613.81
5.5.00.0100.00713.70

preferences:
39 ms | 400 KiB | 5 Q