3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "lgx sinx cosx textxtanxsinx"; $patternReplace = preg_replace("/(lg|sin|cos)+(x)/", "$1($2)", $string); print $patternReplace;

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.70.0070.01118.43
8.3.60.0120.00918.56
8.3.50.0140.00416.42
8.3.40.0140.00418.66
8.3.30.0070.00718.82
8.3.20.0080.00018.85
8.3.10.0040.00423.70
8.3.00.0040.00421.77
8.2.180.0110.00416.63
8.2.170.0110.00422.96
8.2.160.0040.01119.38
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0050.00321.20
8.2.120.0080.00026.35
8.2.110.0000.00921.06
8.2.100.0190.00517.56
8.2.90.0030.00517.88
8.2.80.0050.00318.86
8.2.70.0040.00417.88
8.2.60.0050.00317.93
8.2.50.0090.00018.07
8.2.40.0040.00418.16
8.2.30.0040.00418.09
8.2.20.0050.00218.01
8.2.10.0080.00018.21
8.2.00.0000.00719.52
8.1.280.0090.00925.92
8.1.270.0040.00420.52
8.1.260.0040.00426.35
8.1.250.0000.01528.09
8.1.240.0080.00019.48
8.1.230.0090.00317.82
8.1.220.0050.00317.80
8.1.210.0000.00918.77
8.1.200.0080.00017.48
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0040.00718.59
8.1.160.0000.00818.76
8.1.150.0000.00718.77
8.1.140.0000.00818.78
8.1.130.0030.00320.29
8.1.120.0000.00717.44
8.1.110.0040.00417.58
8.1.100.0040.00417.44
8.1.90.0000.00717.56
8.1.80.0000.00817.47
8.1.70.0040.00417.59
8.1.60.0000.00917.58
8.1.50.0040.00417.61
8.1.40.0030.00517.49
8.1.30.0070.00017.64
8.1.20.0040.00417.57
8.1.10.0040.00717.57
8.1.00.0000.00817.52
8.0.300.0080.00018.77
8.0.290.0050.00316.75
8.0.280.0070.00018.48
8.0.270.0030.00317.19
8.0.260.0030.00318.34
8.0.250.0030.00317.02
8.0.240.0000.00617.06
8.0.230.0030.00316.95
8.0.220.0020.00517.00
8.0.210.0080.00016.98
8.0.200.0060.00317.09
8.0.190.0090.00017.06
8.0.180.0040.00416.89
8.0.170.0030.00616.90
8.0.160.0040.00417.08
8.0.150.0050.00316.93
8.0.140.0050.00216.87
8.0.130.0030.00313.46
8.0.120.0000.00816.97
8.0.110.0040.00416.86
8.0.100.0070.00016.95
8.0.90.0070.00017.01
8.0.80.0090.01016.93
8.0.70.0020.00516.93
8.0.60.0000.00816.83
8.0.50.0040.00417.00
8.0.30.0180.00417.39
8.0.20.0120.00817.40
8.0.10.0070.00016.97
8.0.00.0110.00616.92
7.4.330.0000.00515.55
7.4.320.0000.00616.73
7.4.300.0060.00016.80
7.4.290.0070.00316.55
7.4.280.0030.00616.64
7.4.270.0070.00016.66
7.4.260.0000.00716.63
7.4.250.0030.00316.67
7.4.240.0030.00316.67
7.4.230.0000.00716.48
7.4.220.0030.00516.50
7.4.210.0060.00816.80
7.4.200.0030.00316.79
7.4.160.0090.00816.66
7.4.140.0090.00917.86
7.4.130.0100.01016.80
7.4.120.0100.00916.62
7.4.110.0130.00316.67
7.4.100.0120.01216.64
7.4.90.0130.01916.66
7.4.80.0000.01819.39
7.4.70.0090.00916.62
7.4.60.0060.01316.82
7.4.50.0060.00916.50
7.4.40.0140.00916.52
7.4.00.0080.00815.14
7.3.330.0020.00213.09
7.3.320.0090.00013.14
7.3.310.0000.00716.20
7.3.300.0030.00316.27
7.3.290.0030.00316.20
7.3.280.0100.01016.25
7.3.260.0080.01116.40
7.3.240.0100.00716.57
7.3.230.0130.01016.38
7.3.210.0160.00016.66
7.3.200.0100.00616.43
7.3.190.0030.01816.25
7.3.180.0070.00916.59
7.3.170.0060.01216.70
7.3.160.0110.01116.41
7.3.120.0140.00414.97
7.3.110.0120.00614.86
7.3.100.0080.00414.89
7.3.90.0100.00714.85
7.3.80.0070.00714.87
7.3.70.0060.00614.73
7.3.60.0040.01115.01
7.3.50.0080.00014.73
7.3.40.0000.01114.94
7.3.30.0060.00914.59
7.3.20.0090.00616.76
7.3.10.0100.00016.77
7.3.00.0070.01016.72
7.2.330.0080.01016.57
7.2.320.0030.01416.50
7.2.310.0000.01616.67
7.2.300.0060.01116.69
7.2.290.0060.00916.70
7.2.250.0060.01315.23
7.2.240.0130.00715.16
7.2.230.0040.01115.11
7.2.220.0030.01215.10
7.2.210.0080.00814.88
7.2.200.0050.00514.94
7.2.190.0100.00715.01
7.2.180.0060.00614.82
7.2.170.0030.01014.92
7.2.90.0420.01014.94
7.2.80.0500.00614.77
7.2.70.0700.00615.22
7.2.60.0690.00315.25
7.2.50.0430.01015.14
7.2.40.0440.01215.06
7.2.30.0390.01215.13
7.2.20.0480.00915.02
7.2.10.0700.01014.82
7.2.00.0550.00315.11
7.1.330.0070.00716.07
7.1.320.0090.00616.03
7.1.310.0000.01315.89
7.1.300.0080.00815.91
7.1.290.0090.00616.11
7.1.280.0040.00715.91
7.1.270.0120.00415.86
7.1.260.0030.00915.71
7.1.210.0620.00714.21
7.1.200.0760.01013.77
7.1.190.0470.00314.00
7.1.180.0460.00314.07
7.1.170.0440.00713.84
7.1.160.0540.00414.07
7.1.150.0590.00813.96
7.1.140.0770.00613.78
7.1.130.1360.00614.07
7.1.120.0290.01014.18
7.1.110.0480.01014.12
7.1.100.0620.01013.97
7.1.90.0650.00713.92
7.1.80.0630.00313.89
7.1.70.0550.00614.12
7.1.60.0650.00632.28
7.1.50.0890.01032.16
7.1.40.1040.02031.87
7.1.30.0970.01332.05
7.1.20.1050.01332.17
7.1.10.0620.00713.89
7.1.00.0430.00314.23

preferences:
70.48 ms | 401 KiB | 5 Q