3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str_ireplace_assoc(array $replace, $subject) { return str_ireplace(array_keys($replace), array_values($replace), $subject); } function preg_replace_assoc(array $replace, $subject) { return preg_replace(array_keys($replace), array_values($replace), $subject); } $t = "2007-06-21 - Mitja Prinz @ FĂȘte de la Musique, PhB Club, Berlin"; // convert special characters in hex code http://stackoverflow.com/questions/14091341/ // FIXME use this if PHP 5.4+ #$t = mb_strtolower(html_entity_decode($t,ENT_COMPAT|ENT_HTML401,'UTF-8'),'UTF-8'); $str_repl = array( '#xC0;'=>'#xE0;','#xC1;'=>'#xE1;','#xC2;'=>'#xE2;','#xC3;'=>'#xE3;','#xC4;'=>'#xE4;','#xC5;'=>'#xE5;','#x100;'=>'#x101;','#x102;'=>'#x103;','#x104;'=>'#x105;','#x1DE;'=>'#x1DF;','#x1FA;'=>'#x1FB;','#xC6;'=>'#xE6;','#x1FC;'=>'#x1FD;','#x1E02;'=>'#x1E03;','#x106;'=>'#x107;','#xC7;'=>'#xE7;','#x10C;'=>'#x10D;','#x108;'=>'#x109;','#x10A;'=>'#x10B;','#x1E10;'=>'#x1E11;','#x10E;'=>'#x10F;','#x1E0A;'=>'#x1E0B;','#x110;'=>'#x111;','#xD0;'=>'#xF0;','#x1F1;'=>'#x1F3;','#x1F2;'=>'#x1F3;','#x1C4;'=>'#x1C6;','#x1C5;'=>'#x1C6;','#xC8;'=>'#xE8;','#xC9;'=>'#xE9;','#x11A;'=>'#x11B;','#xCA;'=>'#xEA;','#xCB;'=>'#xEB;','#x112;'=>'#x113;','#x114;'=>'#x115;','#x118;'=>'#x119;','#x116;'=>'#x117;','#x1B7;'=>'#x292;','#x1EE;'=>'#x1EF;','#x1E1E;'=>'#x1E1F;','#x1F4;'=>'#x1F5;','#x122;'=>'#x123;','#x1E6;'=>'#x1E7;','#x11C;'=>'#x11D;','#x11E;'=>'#x11F;','#x120;'=>'#x121;','#x1E4;'=>'#x1E5;','#x124;'=>'#x125;','#x126;'=>'#x127;','#xCC;'=>'#xEC;','#xCD;'=>'#xED;','#xCE;'=>'#xEE;','#x128;'=>'#x129;','#xCF;'=>'#xEF;','#x12A;'=>'#x12B;','#x12C;'=>'#x12D;','#x12E;'=>'#x12F;','#x130;'=>'#x131;','#x132;'=>'#x133;','#x134;'=>'#x135;','#x1E30;'=>'#x1E31;','#x136;'=>'#x137;','#x1E8;'=>'#x1E9;','#x139;'=>'#x13A;','#x13B;'=>'#x13C;','#x13D;'=>'#x13E;','#x13F;'=>'#x140;','#x141;'=>'#x142;','#x1C7;'=>'#x1C9;','#x1C8;'=>'#x1C9;','#x1E40;'=>'#x1E41;','#x143;'=>'#x144;','#x145;'=>'#x146;','#x147;'=>'#x148;','#xD1;'=>'#xF1;','#x14A;'=>'#x14B;','#x1CA;'=>'#x1CC;','#x1CB;'=>'#x1CC;','#xD2;'=>'#xF2;','#xD3;'=>'#xF3;','#xD4;'=>'#xF4;','#xD5;'=>'#xF5;','#xD6;'=>'#xF6;','#x14C;'=>'#x14D;','#x14E;'=>'#x14F;','#xD8;'=>'#xF8;','#x150;'=>'#x151;','#x1FE;'=>'#x1FF;','#x152;'=>'#x153;','#x1E56;'=>'#x1E57;','#x154;'=>'#x155;','#x156;'=>'#x157;','#x158;'=>'#x159;','#x15A;'=>'#x15B;','#x15E;'=>'#x15F;','#x160;'=>'#x161;','#x15C;'=>'#x15D;','#x1E60;'=>'#x1E61;','#x162;'=>'#x163;','#x164;'=>'#x165;','#x1E6A;'=>'#x1E6B;','#x166;'=>'#x167;','#xDE;'=>'#xFE;','#xD9;'=>'#xF9;','#xDA;'=>'#xFA;','#xDB;'=>'#xFB;','#x168;'=>'#x169;','#xDC;'=>'#xFC;','#x16E;'=>'#x16F;','#x16A;'=>'#x16B;','#x16C;'=>'#x16D;','#x172;'=>'#x173;','#x170;'=>'#x171;','#x1E80;'=>'#x1E81;','#x1E82;'=>'#x1E83;','#x174;'=>'#x175;','#x1E84;'=>'#x1E85;','#x1EF2;'=>'#x1EF3;','#xDD;'=>'#xFD;','#x176;'=>'#x177;','#x9F;'=>'#xFF;','#x179;'=>'#x17A;','#x17D;'=>'#x17E;','#x17B;'=>'#x17C;', ); $t = str_ireplace_assoc($str_repl, $t); echo $t; ?>

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.0100.00716.74
8.3.50.0120.00317.29
8.3.40.0110.00418.60
8.3.30.0110.00418.72
8.3.20.0080.00018.52
8.3.10.0030.00620.59
8.3.00.0000.00817.50
8.2.180.0040.01918.16
8.2.170.0070.01422.96
8.2.160.0090.00622.31
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00319.66
8.2.110.0090.00020.99
8.2.100.0070.00417.91
8.2.90.0090.00019.21
8.2.80.0080.00018.03
8.2.70.0050.00317.63
8.2.60.0030.00517.93
8.2.50.0030.00518.07
8.2.40.0020.00518.25
8.2.30.0000.00718.10
8.2.20.0000.00717.59
8.2.10.0030.00617.66
8.2.00.0080.00017.78
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00622.29
8.1.230.0110.00020.94
8.1.220.0080.00017.76
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0000.00817.50
8.1.180.0080.00018.10
8.1.170.0040.00418.72
8.1.160.0000.00718.78
8.1.150.0040.00418.66
8.1.140.0080.00017.30
8.1.130.0030.00517.73
8.1.120.0050.00217.36
8.1.110.0040.00417.33
8.1.100.0000.00717.44
8.1.90.0070.00017.34
8.1.80.0000.00817.44
8.1.70.0000.00717.42
8.1.60.0050.00217.55
8.1.50.0000.00717.39
8.1.40.0000.00817.54
8.1.30.0070.00017.65
8.1.20.0050.00317.64
8.1.10.0000.00817.41
8.1.00.0020.00517.36
8.0.300.0000.00820.10
8.0.290.0000.00716.75
8.0.280.0030.00518.48
8.0.270.0000.00717.30
8.0.260.0000.00616.90
8.0.250.0070.00016.99
8.0.240.0000.00716.86
8.0.230.0030.00316.97
8.0.220.0070.00016.82
8.0.210.0000.00716.91
8.0.200.0020.00516.94
8.0.190.0000.00716.89
8.0.180.0000.00716.91
8.0.170.0090.00016.92
8.0.160.0030.00316.91
8.0.150.0040.00416.84
8.0.140.0000.00816.75
8.0.130.0030.00313.29
8.0.120.0070.00016.83
8.0.110.0000.00816.72
8.0.100.0080.00016.86
8.0.90.0050.00216.75
8.0.80.0060.00916.79
8.0.70.0000.00816.92
8.0.60.0080.00016.93
8.0.50.0040.00416.73
8.0.30.0070.01217.11
8.0.20.0180.00517.05
8.0.10.0040.00416.95
8.0.00.0140.00816.81
7.4.330.0050.00012.89
7.4.320.0080.00016.50
7.4.300.0030.00316.53
7.4.290.0070.00016.63
7.4.280.0030.00616.65
7.4.270.0000.01116.55
7.4.260.0050.00013.30
7.4.250.0060.00316.39
7.4.240.0040.00416.44
7.4.230.0040.00416.71
7.4.220.0030.01816.61
7.4.210.0080.00816.58
7.4.200.0030.00316.39
7.4.190.0030.00316.63
7.4.160.0060.01116.44
7.4.150.0130.00616.70
7.4.140.0070.01016.51
7.4.130.0090.00716.47
7.4.120.0080.00916.50
7.4.110.0140.00616.67
7.4.100.0090.00916.55
7.4.90.0130.01016.53
7.4.80.0160.00716.56
7.4.70.0090.01216.49
7.4.60.0030.01416.46
7.4.50.0060.00316.46
7.4.40.0060.00616.50
7.4.30.0000.01616.48
7.4.10.0100.00614.67
7.4.00.0080.00814.80
7.3.330.0000.00613.40
7.3.320.0030.00313.12
7.3.310.0000.00716.18
7.3.300.0040.00416.33
7.3.290.0100.00316.46
7.3.280.0070.01016.36
7.3.270.0150.00316.27
7.3.260.0080.01116.46
7.3.250.0130.00416.43
7.3.240.0100.00716.67
7.3.230.0080.00816.45
7.3.210.0060.01016.43
7.3.200.0130.01019.39
7.3.190.0040.01416.41
7.3.180.0040.01116.61
7.3.170.0060.00916.39
7.3.160.0080.00816.25
7.3.130.0090.00615.08
7.3.120.0080.00514.76
7.3.110.0080.00514.66
7.3.100.0000.01114.80
7.3.90.0040.01114.83
7.3.80.0030.01214.98
7.3.70.0030.01014.91
7.3.60.0090.00914.91
7.3.50.0060.00314.73
7.3.40.0040.01114.54
7.3.30.0070.00414.72
7.3.20.0000.01516.64
7.3.10.0040.01116.62
7.3.00.0090.00316.70
7.2.330.0110.01116.75
7.2.320.0090.01316.36
7.2.310.0130.01116.83
7.2.300.0070.01016.77
7.2.290.0080.00816.55
7.2.260.0030.01715.23
7.2.250.0120.00315.12
7.2.240.0060.00314.99
7.2.230.0070.01014.86
7.2.220.0000.01415.20
7.2.210.0060.00915.04
7.2.200.0060.00614.98
7.2.190.0070.01015.11
7.2.180.0100.00615.08
7.2.170.0060.00314.94
7.2.160.0040.00715.05
7.2.150.0000.01016.70
7.2.140.0060.00616.94
7.2.130.0070.00717.00
7.2.120.0070.00716.88
7.2.110.0040.01416.64
7.2.100.0030.01016.87
7.2.90.0060.01016.89
7.2.80.0060.00616.87
7.2.70.0000.01416.81
7.2.60.0100.00716.97
7.2.50.0060.00316.91
7.2.40.0000.01616.70
7.2.30.0090.00316.92
7.2.20.0100.00616.77
7.2.10.0070.01016.74
7.2.00.0090.00918.24
7.1.330.0030.00815.98
7.1.320.0030.00615.91
7.1.310.0110.00015.72
7.1.300.0030.00715.72
7.1.290.0070.00415.63
7.1.280.0040.00415.82
7.1.270.0030.01215.52
7.1.260.0060.00615.80
7.1.250.0040.00415.52
7.1.240.0000.01115.64
7.1.230.0030.00615.90
7.1.220.0100.00315.91
7.1.210.0000.01315.58
7.1.200.0080.00815.56
7.1.190.0000.01515.64
7.1.180.0030.01015.80
7.1.170.0050.00515.80
7.1.160.0110.00315.80
7.1.150.0060.00615.53
7.1.140.0100.00615.63
7.1.130.0030.01315.60
7.1.120.0070.00315.66
7.1.110.0130.00315.76
7.1.100.0070.00816.97
7.1.90.0030.01015.85
7.1.80.0000.01315.82
7.1.70.0040.00616.57
7.1.60.0080.00717.57
7.1.50.0060.00916.39
7.1.40.0000.01015.86
7.1.30.0060.00915.91
7.1.20.0040.00815.92
7.1.10.0060.00315.67
7.1.00.0050.03719.04
7.0.330.0040.00415.36
7.0.320.0100.00315.43
7.0.310.0000.01515.59
7.0.300.0000.01615.47
7.0.290.0070.00715.57
7.0.280.0070.00715.36
7.0.270.0040.01115.61
7.0.260.0070.00715.26
7.0.250.0030.01015.37
7.0.240.0000.01215.51
7.0.230.0040.00915.57
7.0.220.0030.01015.43
7.0.210.0040.00815.46
7.0.200.0050.00616.04
7.0.190.0060.00615.38
7.0.180.0000.01315.58
7.0.170.0030.01015.57
7.0.160.0000.01515.20
7.0.150.0030.01015.25
7.0.140.0030.04018.64
7.0.130.0030.00615.35
7.0.120.0050.03318.85
7.0.110.0000.01415.48
7.0.100.0060.00615.48
7.0.90.0090.00315.52
7.0.80.0070.01015.36
7.0.70.0000.01315.11
7.0.60.0020.03217.61
7.0.50.0020.03516.86
7.0.40.0080.03816.76
7.0.30.0100.02616.88
7.0.20.0220.04216.80
7.0.10.0170.04416.76
7.0.00.0070.02416.86
5.6.400.0000.01314.60
5.6.390.0070.00714.33
5.6.380.0070.00314.39
5.6.370.0000.01214.41
5.6.360.0060.01214.34
5.6.350.0070.01114.30
5.6.340.0000.01514.49
5.6.330.0070.00714.70
5.6.320.0070.00714.45
5.6.310.0030.00614.49
5.6.300.0080.00314.61
5.6.290.0130.00014.55
5.6.280.0080.03717.71
5.6.270.0120.00314.40
5.6.260.0060.00314.48
5.6.250.0130.00014.19
5.6.240.0040.00814.58
5.6.230.0000.01414.50
5.6.220.0040.01114.39
5.6.210.0070.03617.44
5.6.200.0100.02816.24
5.6.190.0030.02717.57
5.6.180.0220.04117.30
5.6.170.0170.04217.46
5.6.160.0050.03717.39
5.6.150.0070.03916.18
5.6.140.0100.04016.21
5.6.130.0090.04216.24
5.6.120.0070.03917.63
5.6.110.0070.04517.80
5.6.100.0090.04117.71
5.6.90.0070.04317.85
5.6.80.0110.03917.36
5.6.70.0040.00414.08
5.6.60.0060.00614.26
5.6.50.0100.00314.25
5.6.40.0070.00714.24
5.6.30.0070.00714.57
5.6.20.0040.00414.47
5.6.10.0040.00814.24
5.6.00.0030.01014.34
5.5.380.0060.00314.09
5.5.370.0090.00314.46
5.5.360.0070.00314.40
5.5.350.0160.04617.21
5.5.340.0060.02816.12
5.5.330.0080.04317.49
5.5.320.0100.03717.21
5.5.310.0130.04517.42
5.5.300.0100.04116.13
5.5.290.0070.02316.09
5.5.280.0030.02717.51
5.5.270.0030.02517.59
5.5.260.0080.04017.45
5.5.250.0030.02617.19
5.5.240.0040.02517.14
5.5.230.0070.00414.38
5.5.220.0090.00314.29
5.5.210.0030.01014.04
5.5.200.0000.00914.16
5.5.190.0060.00913.99
5.5.180.0000.01414.41
5.5.170.0060.00914.34
5.5.160.0000.01414.18
5.5.150.0040.00714.10
5.5.140.0120.00314.20
5.5.130.0070.00713.93
5.5.120.0060.00614.34
5.5.110.0040.01114.22
5.5.100.0070.00714.39
5.5.90.0030.00614.26
5.5.80.0080.00814.06
5.5.70.0030.01313.95
5.5.60.0140.00314.38
5.5.50.0130.00314.35
5.5.40.0040.01114.23
5.5.30.0060.00614.34
5.5.20.0100.00614.32
5.5.10.0040.01113.96
5.5.00.0000.01914.37
5.4.450.0150.03915.81
5.4.440.0140.03915.82
5.4.430.0120.04215.88
5.4.420.0100.02715.75
5.4.410.0090.02315.91
5.4.400.0100.02215.59
5.4.390.0120.02215.60
5.4.380.0100.02115.69
5.4.370.0110.01815.74
5.4.360.0070.02415.70
5.4.350.0060.02615.79
5.4.340.0100.01815.69
5.4.330.0000.01012.31
5.4.320.0170.02215.59
5.4.310.0050.02615.76
5.4.300.0100.01815.76
5.4.290.0120.02415.81
5.4.280.0100.02015.81
5.4.270.0100.02215.73
5.4.260.0130.01815.58
5.4.250.0140.01715.76
5.4.240.0120.02515.70
5.4.230.0050.02515.78
5.4.220.0140.02115.57
5.4.210.0130.02315.70
5.4.200.0120.04315.67
5.4.190.0130.03815.65
5.4.180.0100.03215.77
5.4.170.0100.04015.68
5.4.160.0150.04115.64
5.4.150.0130.02115.72
5.4.140.0130.02514.35
5.4.130.0120.02214.38
5.4.120.0120.04014.35
5.4.110.0120.03814.47
5.4.100.0150.03314.32
5.4.90.0120.02214.40
5.4.80.0150.03414.40
5.4.70.0150.04014.41
5.4.60.0120.02514.45
5.4.50.0150.02414.30
5.4.40.0150.03214.39
5.4.30.0120.04314.35
5.4.20.0120.02014.39
5.4.10.0120.02514.26
5.4.00.0120.03814.11
5.3.290.0060.02113.56
5.3.280.0190.02913.48
5.3.270.0110.02213.46
5.3.260.0130.04013.57
5.3.250.0120.03513.53
5.3.240.0160.03613.57
5.3.230.0100.02413.45
5.3.220.0120.03913.46
5.3.210.0140.03413.58
5.3.200.0120.04213.48
5.3.190.0200.03713.55
5.3.180.0150.03613.47
5.3.170.0180.03013.42
5.3.160.0180.01813.42
5.3.150.0130.03213.55
5.3.140.0150.03613.50
5.3.130.0210.02913.46
5.3.120.0120.02313.51
5.3.110.0140.03613.42
5.3.100.0130.02313.19
5.3.90.0130.03713.31
5.3.80.0130.03513.23
5.3.70.0120.03813.31
5.3.60.0130.03313.19
5.3.50.0160.01813.28
5.3.40.0100.04113.11
5.3.30.0120.03813.19
5.3.20.0150.03612.99
5.3.10.0180.03213.13
5.3.00.0080.03812.97
5.2.170.0230.03711.60
5.2.160.0230.05311.60
5.2.150.0200.04311.60
5.2.140.0170.06711.60
5.2.130.0300.04311.60
5.2.120.0130.03311.60
5.2.110.0170.05311.60
5.2.100.0130.05011.60
5.2.90.0200.05711.60
5.2.80.0170.05011.60
5.2.70.0200.03011.60
5.2.60.0100.05311.60
5.2.50.0200.02711.60
5.2.40.0070.03311.60
5.2.30.0130.03311.60
5.2.20.0130.04311.60
5.2.10.0200.02311.60
5.2.00.0170.05311.60
5.1.60.0170.04711.60
5.1.50.0100.04311.60
5.1.40.0200.05011.60
5.1.30.0170.03011.60
5.1.20.0170.04711.60
5.1.10.0170.05011.60
5.1.00.0200.04311.60
5.0.50.0070.04711.60
5.0.40.0030.04711.60
5.0.30.0070.06311.60
5.0.20.0070.04011.60
5.0.10.0130.03711.60
5.0.00.0100.06711.60
4.4.90.0100.03311.60
4.4.80.0030.02011.60
4.4.70.0030.02311.60
4.4.60.0030.02711.60
4.4.50.0070.02711.60
4.4.40.0070.04011.60
4.4.30.0070.04011.60
4.4.20.0130.03311.60
4.4.10.0070.02011.60
4.4.00.0100.04011.60
4.3.110.0070.02311.60
4.3.100.0100.03011.60
4.3.90.0100.04711.60
4.3.80.0030.04311.60
4.3.70.0030.02011.60
4.3.60.0070.01711.60
4.3.50.0070.01711.60
4.3.40.0070.02311.60
4.3.30.0070.03011.60
4.3.20.0030.01311.60
4.3.10.0030.02711.60
4.3.00.0030.03011.60

preferences:
44.19 ms | 401 KiB | 5 Q