3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'bar', 'fdsfsf345#3gt#$%3^#$T$#tr43r43', 'test spaces', '"test spaces"', '"fdsfsf345#3gt#$%3^#$T$#tr43r43" #comment', 'test spaces" #comment', 'bar', '""', '""""', 'foo1 #comment2', '"with space value" #comment', 'with quote value\'', 'somestringstart', 'with spaces" # a comment', 'bar' ]; $result=preg_replace('~ #.*~','',$array); var_export($result);

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.0130.00516.82
8.5.00.0130.01220.03
8.4.160.0110.01219.76
8.4.150.0020.00114.05
8.4.140.0150.00617.82
8.4.130.0080.01217.94
8.4.120.0060.00420.64
8.4.110.0060.00320.39
8.4.100.0130.00817.93
8.4.90.0120.00920.67
8.4.80.0130.00719.09
8.4.70.0100.00918.98
8.4.60.0160.00618.78
8.4.50.0130.00619.53
8.4.40.0030.01219.51
8.4.30.0090.00917.62
8.4.20.0100.01019.39
8.4.10.0060.00319.46
8.3.280.0080.01218.58
8.3.270.0130.00716.48
8.3.260.0080.01216.64
8.3.250.0090.00318.52
8.3.240.0140.00516.70
8.3.230.0140.00616.67
8.3.220.0130.00618.73
8.3.210.0040.00418.63
8.3.200.0100.00916.49
8.3.190.0040.00416.78
8.3.180.0110.01018.97
8.3.170.0050.00216.78
8.3.160.0090.00917.17
8.3.150.0040.00417.14
8.3.140.0080.00016.70
8.3.130.0130.00618.22
8.3.120.0130.00318.73
8.3.110.0100.00020.94
8.3.100.0030.00624.06
8.3.90.0110.00326.77
8.3.80.0060.00319.36
8.3.70.0100.00618.31
8.3.60.0070.00716.63
8.3.50.0100.00817.37
8.3.40.0000.01718.89
8.3.30.0080.00818.71
8.3.20.0030.00621.73
8.3.10.0040.00423.66
8.3.00.0000.00822.10
8.2.290.0110.00416.76
8.2.280.0050.00318.40
8.2.270.0100.00718.87
8.2.260.0080.00016.55
8.2.250.0080.01116.61
8.2.240.0090.00017.30
8.2.230.0030.00722.58
8.2.220.0070.00337.54
8.2.210.0140.00326.77
8.2.200.0090.00018.88
8.2.190.0120.00916.63
8.2.180.0110.00718.24
8.2.170.0070.00722.96
8.2.160.0100.00320.29
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00421.11
8.2.120.0040.00426.35
8.2.110.0070.00321.11
8.2.100.0060.00617.59
8.2.90.0030.00617.91
8.2.80.0030.00618.03
8.2.70.0030.00717.63
8.2.60.0000.00818.03
8.2.50.0000.00918.10
8.2.40.0080.00020.42
8.2.30.0040.00422.47
8.2.20.0030.00618.02
8.2.10.0030.00618.09
8.2.00.0040.00418.00
8.1.330.0110.00816.27
8.1.320.0140.00516.31
8.1.310.0070.01116.82
8.1.300.0060.01316.39
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0070.00022.14
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00422.47
8.1.230.0160.00620.45
8.1.220.0060.00317.74
8.1.210.0030.00518.77
8.1.200.0090.00017.35
8.1.190.0080.00017.35
8.1.180.0050.00518.10
8.1.170.0030.00518.59
8.1.160.0040.00418.77
8.1.150.0040.00420.24
8.1.140.0000.00717.63
8.1.130.0030.00319.01
8.1.120.0040.00417.59
8.1.110.0040.00417.53
8.1.100.0030.00517.44
8.1.90.0030.00517.46
8.1.80.0080.00017.61
8.1.70.0000.00917.53
8.1.60.0030.00517.61
8.1.50.0070.00017.52
8.1.40.0000.00817.61
8.1.30.0080.00017.73
8.1.20.0000.00817.77
8.1.10.0070.00017.50
8.1.00.0070.00317.55
8.0.300.0000.00819.90
8.0.290.0000.00716.75
8.0.280.0030.00318.36
8.0.270.0060.00317.23
8.0.260.0000.00616.95
8.0.250.0030.00316.87
8.0.240.0030.00317.03
8.0.230.0030.00416.93
8.0.220.0000.00716.98
8.0.210.0000.00816.89
8.0.200.0040.00417.14
8.0.190.0060.00317.06
8.0.180.0000.00716.99
8.0.170.0060.00316.91
8.0.160.0040.00417.07
8.0.150.0030.00616.83
8.0.140.0000.00816.91
8.0.130.0030.00313.46
8.0.120.0060.00317.00
8.0.110.0050.00316.92
8.0.100.0000.00716.84
8.0.90.0000.00716.96
8.0.80.0130.00316.93
8.0.70.0000.00716.93
8.0.60.0040.00416.76
8.0.50.0030.00516.95
8.0.30.0080.00917.22
8.0.20.0110.00917.40
8.0.10.0000.00816.96
8.0.00.0130.00716.84
7.4.330.0050.00015.55
7.4.320.0000.00616.68
7.4.300.0060.00016.76
7.4.290.0040.00716.72
7.4.280.0040.00416.55
7.4.270.0070.00016.73
7.4.260.0030.00316.78
7.4.250.0000.00916.72
7.4.240.0050.00216.59
7.4.230.0070.00016.64
7.4.220.0030.00316.78
7.4.210.0060.00916.73
7.4.200.0000.00716.77
7.4.160.0110.00916.61
7.4.140.0100.00717.86
7.4.130.0200.00316.60
7.4.120.0130.00716.70
7.4.110.0100.00716.56
7.4.100.0100.00716.60
7.4.90.0120.00616.55
7.4.80.0060.01419.39
7.4.70.0110.00716.50
7.4.60.0030.01316.60
7.4.50.0000.01616.61
7.4.40.0040.01216.59
7.4.00.0120.00014.92
7.3.330.0000.00513.21
7.3.320.0030.00313.21
7.3.310.0030.00316.36
7.3.300.0040.00416.33
7.3.290.0060.01116.24
7.3.280.0110.00516.25
7.3.260.0100.00716.32
7.3.240.0110.01016.32
7.3.230.0140.00316.22
7.3.210.0030.01316.54
7.3.200.0060.01216.31
7.3.190.0140.00316.54
7.3.180.0030.01316.50
7.3.170.0130.00316.49
7.3.160.0120.00616.71
7.3.10.0100.00316.50
7.3.00.0040.00816.34
7.2.330.0150.00416.61
7.2.320.0040.01416.65
7.2.310.0120.00616.78
7.2.300.0140.01116.69
7.2.290.0110.00716.74
7.2.130.0040.01217.03
7.2.120.0060.00916.73
7.2.110.0070.00317.03
7.2.100.0090.00316.86
7.2.90.0080.00816.87
7.2.80.0030.00616.79
7.2.70.0050.00516.79
7.2.60.0040.00916.97
7.2.50.0070.01117.01
7.2.40.0070.00716.96
7.2.30.0130.01117.57
7.2.20.0120.00817.48
7.2.10.0120.00817.38
7.2.00.0070.01217.52
7.1.250.0070.00315.87
7.1.200.0060.00915.84
7.1.150.0180.01516.86
7.1.140.0180.01217.15
7.1.130.0130.01117.02
7.1.120.0140.01016.70
7.1.110.0140.00916.69
7.1.100.0140.00616.50
7.1.90.0120.01216.20
7.1.80.0130.01216.39
7.1.70.0110.01315.13
7.1.60.0310.01433.30
7.1.50.0260.02033.18
7.1.40.0420.02132.79
7.1.30.0340.02132.85
7.1.20.0300.01232.85
7.1.10.0140.01114.89
7.1.00.0120.01315.00

preferences:
162.85 ms | 403 KiB | 5 Q