3v4l.org

run code in 300+ PHP versions simultaneously
<?php $utf8_to_iso8859_1_translation_table = array( ); $utf8_to_iso8859_1_translation_table2 = array( ); for( $a = 0; $a<256; $a++ ) { $iso_8859_1 = mb_convert_encoding( "&#$a;" , 'ISO-8859-1' , 'HTML-ENTITIES' ); $utf8 = mb_convert_encoding( $iso_8859_1 , 'UTF-8' , 'ISO-8859-1' ); //$utf8 = utf8_encode( $iso_8859_1 ); $xutf8 = ( '\x' . dechex( ord( $utf8[0] ) ) . ( isset( $utf8[1] ) ? '\x' . dechex( ord( $utf8[1] ) ) . ( isset( $utf8[2] ) ? '\x' . dechex( ord( $utf8[2] ) ) : '' ) : '' ) ); $xiso = ( '\x' . dechex( ord( $iso_8859_1[0] ) ) . ( isset( $iso_8859_1[1] ) ? '\x' . dechex( ord( $iso_8859_1[1] ) ) : '' ) ); $utf8_to_iso8859_1_translation_table[$xutf8] = $xiso;// . ' ' . $a; $utf8_to_iso8859_1_translation_table2[$utf8] = $iso_8859_1;// . ' ' . $a; } //print_r( $utf8_to_iso8859_1_translation_table ); print_r( $utf8_to_iso8859_1_translation_table2 ); die;

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.0090.00616.63
8.3.50.0180.00521.93
8.3.40.0120.00318.84
8.3.30.0060.01618.91
8.3.20.0150.00420.25
8.3.10.0040.01523.63
8.3.00.0100.01022.41
8.2.180.0090.00618.66
8.2.170.0060.00922.96
8.2.160.0140.00022.26
8.2.150.0110.00824.18
8.2.140.0150.00624.66
8.2.130.0090.00926.16
8.2.120.0050.00319.61
8.2.110.0030.00721.25
8.2.100.0110.00018.16
8.2.90.0040.00418.47
8.2.80.0060.00318.28
8.2.70.0030.00618.00
8.2.60.0030.00518.00
8.2.50.0000.00817.98
8.2.40.0040.00420.78
8.2.30.0000.00821.28
8.2.20.0030.00517.93
8.2.10.0060.00319.68
8.2.00.0050.00317.93
8.1.280.0080.01225.92
8.1.270.0030.00620.91
8.1.260.0050.00526.35
8.1.250.0080.00028.09
8.1.240.0100.00023.96
8.1.230.0070.00421.10
8.1.220.0060.00317.80
8.1.210.0100.00018.99
8.1.200.0060.00317.73
8.1.190.0030.00517.73
8.1.180.0040.00418.10
8.1.170.0030.00619.09
8.1.160.0000.00819.08
8.1.150.0050.00320.43
8.1.140.0000.00817.53
8.1.130.0040.00418.03
8.1.120.0090.00317.79
8.1.110.0000.00817.71
8.1.100.0000.00817.78
8.1.90.0000.00717.78
8.1.80.0070.00017.55
8.1.70.0030.00517.69
8.1.60.0030.00717.86
8.1.50.0030.00617.77
8.1.40.0080.00017.66
8.1.30.0000.00917.72
8.1.20.0090.00017.95
8.1.10.0000.01017.87
8.1.00.0040.00417.72
8.0.300.0030.00620.14
8.0.290.0030.00517.00
8.0.280.0000.00818.70
8.0.270.0040.00417.45
8.0.260.0000.00717.13
8.0.250.0040.00417.28
8.0.240.0040.00417.13
8.0.230.0050.00317.25
8.0.220.0000.00717.21
8.0.210.0000.00717.11
8.0.200.0100.00017.22
8.0.190.0030.00617.26
8.0.180.0000.00817.18
8.0.170.0060.00317.21
8.0.160.0030.00617.22
8.0.150.0040.00417.05
8.0.140.0080.00017.00
8.0.130.0000.00713.57
8.0.120.0000.00817.09
8.0.110.0000.00817.13
8.0.100.0000.00817.02
8.0.90.0000.00817.10
8.0.80.0100.00717.11
8.0.70.0060.00316.98
8.0.60.0040.00417.21
8.0.50.0040.00417.02
8.0.30.0130.01217.10
8.0.20.0140.00617.40
8.0.10.0040.00417.11
8.0.00.0050.01416.95
7.4.330.0000.00715.22
7.4.320.0000.00816.72
7.4.300.0030.00316.77
7.4.290.0070.00016.85
7.4.280.0000.00716.76
7.4.270.0040.00416.82
7.4.260.0040.00416.68
7.4.250.0090.00016.71
7.4.240.0020.00616.67
7.4.230.0000.00816.62
7.4.220.0160.01216.76
7.4.210.0050.01316.74
7.4.200.0030.00516.74
7.4.190.0030.00516.54
7.4.160.0100.00716.62
7.4.150.0090.00917.40
7.4.140.0080.01117.86
7.4.130.0140.00716.83
7.4.120.0130.00816.73
7.4.110.0060.01216.61
7.4.100.0060.01416.74
7.4.90.0120.01216.69
7.4.80.0090.00916.55
7.4.70.0040.01716.88
7.4.60.0060.01316.73
7.4.50.0000.00816.42
7.4.40.0090.00622.77
7.4.30.0070.01016.59
7.4.00.0070.01115.27
7.3.330.0000.00613.57
7.3.320.0000.00613.43
7.3.310.0040.00416.52
7.3.300.0000.00716.59
7.3.290.0120.00316.57
7.3.280.0090.00916.58
7.3.270.0060.01217.40
7.3.260.0150.00316.65
7.3.250.0170.00616.57
7.3.240.0090.00916.72
7.3.230.0150.00316.72
7.3.210.0060.01316.67
7.3.200.0070.01019.39
7.3.190.0100.00716.76
7.3.180.0140.00316.74
7.3.170.0160.00716.54
7.3.160.0100.00716.74
7.3.120.0000.01815.13
7.3.10.0080.01116.91
7.3.00.0100.00716.79
7.2.330.0100.01017.02
7.2.320.0080.01116.95
7.2.310.0060.01216.77
7.2.300.0060.01316.61
7.2.290.0030.01416.88
7.2.130.0070.01417.05
7.2.120.0140.00017.17
7.2.110.0000.01117.13
7.2.100.0090.01217.28
7.2.90.0070.01416.86
7.2.80.0120.01216.93
7.2.70.0060.01316.78
7.2.60.0000.01517.20
7.2.50.0090.00616.72
7.2.40.0090.01216.88
7.2.30.0060.00616.82
7.2.20.0030.01017.13
7.2.10.0060.00616.96
7.2.00.0040.01218.35
7.1.250.0060.00816.01
7.1.100.0000.01118.52
7.1.70.0200.00317.32
7.1.60.0090.00919.27
7.1.50.0040.00816.80
7.1.00.0030.07322.30
7.0.200.0070.00716.64
7.0.140.0100.07022.12
7.0.100.0100.04320.06
7.0.90.0030.08319.94
7.0.80.0100.08319.97
7.0.70.0200.07319.95
7.0.60.0070.08319.95
7.0.50.0170.07720.32
7.0.40.0030.09320.13
7.0.30.0170.07320.18
7.0.20.0130.07720.08
7.0.10.0170.07320.14
7.0.00.0170.08020.04
5.6.280.0030.10020.84
5.6.250.0100.08320.67
5.6.240.0070.09320.81
5.6.230.0170.07020.74
5.6.220.0100.07720.70
5.6.210.0170.08020.65
5.6.200.0070.07021.14
5.6.190.0070.07721.11
5.6.180.0230.06720.98
5.6.170.0230.07021.20
5.6.160.0070.05721.18
5.6.150.0100.08321.11
5.6.140.0100.08320.99
5.6.130.0030.08321.07
5.6.120.0030.06721.12
5.6.110.0130.08321.00
5.6.100.0170.07720.98
5.6.90.0130.08021.03
5.6.80.0100.08320.50
5.6.70.0130.07720.35
5.6.60.0000.08720.36
5.6.50.0100.08320.48
5.6.40.0130.07320.40
5.6.30.0130.08020.41
5.6.20.0130.07020.52
5.6.10.0100.08320.48
5.6.00.0070.08020.32
5.5.380.0030.09020.39
5.5.370.0070.08020.51
5.5.360.0070.06020.51
5.5.350.0100.08320.46
5.5.340.0100.08020.89
5.5.330.0130.07020.91
5.5.320.0200.07320.83
5.5.310.0070.08720.91
5.5.300.0170.07020.91
5.5.290.0130.07320.92
5.5.280.0100.08020.82
5.5.270.0070.08720.81
5.5.260.0100.08020.66
5.5.250.0100.05720.75
5.5.240.0100.08020.25
5.5.230.0130.07720.30
5.5.220.0100.07720.32
5.5.210.0170.07320.30
5.5.200.0070.08320.03
5.5.190.0070.05720.28
5.5.180.0100.08020.26
5.5.160.0070.04720.17
5.5.150.0130.07720.02
5.5.140.0100.07720.14
5.5.130.0200.07020.31
5.5.120.0070.08320.16
5.5.110.0100.07719.97
5.5.100.0030.08320.14
5.5.90.0000.07020.04
5.5.80.0030.06320.13
5.5.70.0100.08320.12
5.5.60.0100.05720.11
5.5.50.0130.07320.12
5.5.40.0030.08020.09
5.5.30.0130.06720.18
5.5.20.0100.08320.18
5.5.10.0170.06720.09
5.5.00.0070.07319.99
5.4.450.0100.08019.45
5.4.440.0130.07319.49
5.4.430.0130.08019.48
5.4.420.0070.07719.46
5.4.410.0100.08019.29
5.4.400.0170.06019.05
5.4.390.0100.08019.20
5.4.380.0100.07718.90
5.4.370.0070.08319.16
5.4.360.0200.06318.85
5.4.350.0030.08718.95
5.4.340.0170.07319.23
5.4.320.0130.07719.03
5.4.310.0070.08319.14
5.4.300.0200.05318.94
5.4.290.0030.08319.18
5.4.280.0170.07319.15
5.4.270.0000.09018.94
5.4.260.0130.07719.16
5.4.250.0070.08319.19
5.4.240.0070.08018.94
5.4.230.0130.07319.20
5.4.220.0100.07019.04
5.4.210.0100.06319.16
5.4.200.0070.06719.13
5.4.190.0100.07719.15
5.4.180.0030.07319.12
5.4.170.0100.06018.84
5.4.160.0000.08019.19
5.4.150.0100.07718.88
5.4.140.0170.07316.20
5.4.130.0130.07316.40
5.4.120.0170.06316.43
5.4.110.0030.08316.33
5.4.100.0070.06316.38
5.4.90.0130.07016.45
5.4.80.0030.08016.49
5.4.70.0070.07316.36
5.4.60.0030.08016.43
5.4.50.0030.05716.36
5.4.40.0070.06716.37
5.4.30.0100.04716.45
5.4.20.0230.05716.59
5.4.10.0030.07016.36
5.4.00.0030.07315.88
5.3.290.0000.08014.69
5.3.280.0170.07314.75
5.3.270.0070.07714.80
5.3.260.0130.05014.76
5.3.250.0030.08714.65
5.3.240.0070.08014.77
5.3.230.0130.06314.80
5.3.220.0130.07714.60
5.3.210.0070.05014.61
5.3.200.0130.06714.68
5.3.190.0100.05714.72
5.3.180.0130.06314.64
5.3.170.0130.06014.71
5.3.160.0130.07314.69
5.3.150.0170.06714.64
5.3.140.0070.08314.71
5.3.130.0130.07314.76
5.3.120.0070.06014.67
5.3.110.0070.06014.67
5.3.100.0070.07714.12
5.3.90.0070.06714.10
5.3.80.0100.07714.13
5.3.70.0100.07314.13
5.3.60.0070.07314.00
5.3.50.0070.07714.05
5.3.40.0000.07314.17
5.3.30.0070.05713.98
5.3.20.0000.07313.89
5.3.10.0130.05713.77
5.3.00.0070.07713.86

preferences:
48.32 ms | 401 KiB | 5 Q