3v4l.org

run code in 300+ PHP versions simultaneously
<?php function preserveAmpersandEscapeInOptionTagForFomanticUiDropdownWithPreserveHtmlFalse($v) { return str_replace('&amp;', '&amp;amp;', $v); } $in = 'A & B &amp;'; // example of text to preserve $in .= ' ' . preserveAmpersandEscapeInOptionTagForFomanticUiDropdownWithPreserveHtmlFalse($in); // example of escaping the text to preserve it 1:1 echo $in . "\n"; $str = preg_replace('~&(?!\w+;)~', '&amp;', $in); // done by browser when parsing/normalizing HTML echo $str . "\n"; $str = str_replace('&amp;', '&', $in); // done by https://github.com/fomantic/Fomantic-UI/pull/3224/commits/0bc8f67dcb echo $str . "\n";

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.5.10.0120.00717.08
8.5.00.0120.01020.36
8.4.160.0150.00722.08
8.4.150.0010.00114.05
8.4.140.0120.01017.83
8.4.130.0050.00418.06
8.4.120.0070.00220.80
8.4.110.0120.00922.38
8.4.100.0100.01118.07
8.4.90.0110.00918.71
8.4.80.0070.00523.91
8.4.70.0110.01018.13
8.4.60.0140.00622.44
8.4.50.0410.00717.68
8.4.40.0200.00417.68
8.4.30.0200.00318.03
8.4.20.0220.00517.78
8.4.10.0210.00517.77
8.3.290.0090.01220.74
8.3.280.0150.00718.63
8.3.270.0090.01016.74
8.3.260.0090.01016.68
8.3.250.0110.00818.73
8.3.240.0120.00716.57
8.3.230.0120.00816.87
8.3.220.0080.01017.27
8.3.210.0100.00416.82
8.3.200.0020.00616.60
8.3.190.0160.00416.28
8.3.180.0180.00216.47
8.3.170.0150.00516.78
8.3.160.0180.00316.71
8.3.150.0160.00618.37
8.3.140.0200.00316.94
8.3.130.0140.00516.82
8.3.120.0140.00516.87
8.3.110.0150.00416.71
8.3.100.0160.00616.68
8.3.90.0190.00516.78
8.3.80.0210.00316.68
8.3.70.0180.00516.56
8.3.60.0140.00716.50
8.3.50.0180.00316.52
8.3.40.0190.00317.49
8.3.30.0130.00517.47
8.3.20.0170.00217.46
8.3.10.0130.00517.52
8.3.00.0050.00519.40
8.2.300.0130.00920.25
8.2.290.0110.00720.26
8.2.280.0140.00416.41
8.2.270.0160.00216.76
8.2.260.0130.00516.09
8.2.250.0120.00616.43
8.2.240.0120.00516.59
8.2.230.0160.00316.66
8.2.220.0120.00516.55
8.2.210.0120.00516.29
8.2.200.0150.00316.54
8.2.190.0140.00416.35
8.2.180.0120.00516.18
8.2.170.0140.00517.59
8.2.160.0170.00417.75
8.2.150.0160.00417.89
8.2.140.0150.00417.80
8.2.130.0210.00817.67
8.2.120.0240.00617.86
8.2.110.0280.00817.66
8.2.100.0230.00417.46
8.2.90.0190.00817.52
8.2.80.0190.00317.41
8.2.70.0170.00217.72
8.2.60.0150.00519.42
8.2.50.0140.00617.64
8.2.40.0130.00417.72
8.2.30.0160.00517.62
8.2.20.0150.00417.61
8.2.10.0130.00417.49
8.2.00.0130.00417.75
8.1.340.0150.00620.28

preferences:
31.66 ms | 403 KiB | 5 Q