3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "lgx sinx cosx textxtanxsinx"; $patternReplace = preg_replace("/(lg|sin|cos)x/", "$1(x)", $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.4.130.0110.00818.71
8.4.120.0100.01122.46
8.4.110.0110.00918.24
8.4.100.0120.00818.04
8.4.90.0080.01120.71
8.4.80.0050.00418.82
8.4.70.0040.00422.39
8.4.60.0130.00520.39
8.4.50.0120.01118.84
8.4.40.0130.00717.93
8.4.30.0160.00319.66
8.4.20.0130.00320.30
8.4.10.0200.00319.70
8.3.260.0040.00416.77
8.3.250.0080.00316.64
8.3.240.0090.00718.36
8.3.230.0090.00916.72
8.3.220.0130.00518.64
8.3.210.0100.01118.59
8.3.200.0050.00416.54
8.3.190.0090.00817.00
8.3.180.0090.01018.89
8.3.170.0120.00616.93
8.3.160.0140.00318.23
8.3.150.0030.01319.05
8.3.140.0000.00816.88
8.3.130.0040.00418.44
8.3.120.0190.00018.94
8.3.110.0000.00818.59
8.3.100.0110.00416.50
8.3.90.0110.00626.77
8.3.80.0030.00718.30
8.3.70.0060.00918.43
8.3.60.0110.00418.55
8.3.50.0070.00817.24
8.3.40.0130.00318.96
8.3.30.0110.00418.93
8.3.20.0050.00318.90
8.3.10.0070.00023.66
8.3.00.0050.00223.66
8.2.290.0150.00416.83
8.2.280.0090.00218.29
8.2.270.0070.01316.89
8.2.260.0070.00317.30
8.2.250.0000.00816.71
8.2.240.0150.00418.88
8.2.230.0090.00020.94
8.2.220.0110.00816.62
8.2.210.0060.00326.77
8.2.200.0000.01118.67
8.2.190.0070.01118.44
8.2.180.0110.00716.50
8.2.170.0040.01522.96
8.2.160.0140.00019.40
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0000.00918.69
8.2.110.0060.00319.39
8.2.100.0100.00317.89
8.2.90.0080.00317.97
8.2.80.0000.00817.97
8.2.70.0040.00417.79
8.2.60.0050.00318.09
8.2.50.0090.00018.10
8.2.40.0050.00219.30
8.2.30.0050.00320.71
8.2.20.0050.00318.08
8.2.10.0030.00518.40
8.2.00.0030.00319.50
8.1.330.0050.00518.00
8.1.320.0110.00816.53
8.1.310.0070.00016.66
8.1.300.0070.01316.22
8.1.290.0110.00418.88
8.1.280.0130.00625.92
8.1.270.0050.00320.66
8.1.260.0040.01126.35
8.1.250.0070.00028.09
8.1.240.0060.00617.64
8.1.230.0070.00420.85
8.1.220.0040.00717.74
8.1.210.0080.00018.90
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0030.00618.64
8.1.160.0000.00818.85
8.1.150.0050.00318.83
8.1.140.0060.00320.70
8.1.130.0000.00720.18
8.1.120.0040.00417.57
8.1.110.0040.00417.56
8.1.100.0000.00717.53
8.1.90.0000.00817.56
8.1.80.0040.00417.58
8.1.70.0040.00417.39
8.1.60.0050.00217.56
8.1.50.0050.00317.52
8.1.40.0040.00417.51
8.1.30.0000.00817.81
8.1.20.0050.00317.68
8.1.10.0090.00017.53
8.1.00.0000.00717.50
8.0.300.0000.00719.84
8.0.290.0080.00016.88
8.0.280.0000.00818.46
8.0.270.0070.00017.18
8.0.260.0000.00720.21
8.0.250.0060.00317.01
8.0.240.0030.00317.11
8.0.230.0000.00917.05
8.0.220.0070.00016.89
8.0.210.0030.00316.91
8.0.200.0000.00617.05
8.0.190.0030.00616.89
8.0.180.0040.00416.91
8.0.170.0080.00017.02
8.0.160.0050.00217.07
8.0.150.0040.00416.87
8.0.140.0040.00416.87
8.0.130.0060.00013.36
8.0.120.0040.00416.83
8.0.110.0030.00616.88
8.0.100.0090.00016.86
8.0.90.0040.00416.78
8.0.80.0110.01017.00
8.0.70.0000.00717.02
8.0.60.0040.00417.04
8.0.50.0020.00516.86
8.0.30.0100.00717.17
8.0.20.0080.01117.40
8.0.10.0000.00716.99
8.0.00.0040.01316.72
7.4.330.0060.00015.55
7.4.320.0000.00616.64
7.4.300.0000.00616.76
7.4.290.0000.01116.66
7.4.280.0030.00616.79
7.4.270.0040.00416.61
7.4.260.0070.00016.76
7.4.250.0000.00816.48
7.4.240.0040.00416.76
7.4.230.0030.00316.76
7.4.220.0000.00716.83
7.4.210.0140.00416.64
7.4.200.0000.00716.75
7.4.160.0100.00816.57
7.4.140.0110.00917.86
7.4.130.0150.00916.53
7.4.120.0090.00916.70
7.4.110.0130.01016.65
7.4.100.0090.00916.64
7.4.90.0110.01116.48
7.4.80.0070.01419.39
7.4.70.0070.01116.76
7.4.60.0070.01016.65
7.4.50.0070.01116.70
7.4.40.0100.01016.79
7.4.10.0090.00915.02
7.4.00.0120.00414.99
7.3.330.0000.00613.20
7.3.320.0040.00413.14
7.3.310.0030.00316.30
7.3.300.0000.00716.33
7.3.290.0070.00016.21
7.3.280.0070.01416.33
7.3.260.0100.00816.50
7.3.240.0080.01116.55
7.3.230.0100.00716.36
7.3.210.0100.00616.39
7.3.200.0090.01216.32
7.3.190.0070.01016.38
7.3.180.0130.00316.52
7.3.170.0100.00616.42
7.3.160.0090.00616.69
7.3.130.0070.00614.74
7.3.120.0030.01314.82
7.3.110.0060.00914.53
7.3.100.0140.00015.11
7.3.90.0100.00314.75
7.3.80.0070.00414.87
7.3.70.0080.00414.68
7.3.60.0040.00714.89
7.3.50.0030.01314.87
7.3.40.0000.01414.98
7.3.30.0070.00714.73
7.3.20.0030.01316.75
7.3.10.0030.01016.71
7.3.00.0100.00416.93
7.2.330.0130.00616.65
7.2.320.0100.01616.65
7.2.310.0070.01416.73
7.2.300.0110.01116.64
7.2.290.0060.01016.83
7.2.260.0060.01215.04
7.2.250.0110.00715.20
7.2.240.0030.01315.00
7.2.230.0120.00414.98
7.2.220.0000.01615.23
7.2.210.0000.01314.86
7.2.200.0060.00915.27
7.2.190.0040.00815.10
7.2.180.0040.00715.13
7.2.170.0040.01115.27
7.2.160.0000.01414.93
7.2.150.0100.00717.14
7.2.140.0030.00916.97
7.2.130.0090.00617.03
7.2.120.0060.01116.85
7.2.110.0140.00416.99
7.2.100.0090.00617.00
7.2.90.0720.01015.53
7.2.80.0690.00715.38
7.2.70.0690.00815.68
7.2.60.0810.01315.72
7.2.50.0850.00715.58
7.2.40.0780.00715.55
7.2.30.0790.00715.75
7.2.20.0730.01015.71
7.2.10.1130.01015.78
7.2.00.1090.00615.68
7.1.330.0030.01016.02
7.1.320.0030.01016.08
7.1.310.0000.01415.67
7.1.300.0110.00415.66
7.1.290.0100.00715.78
7.1.280.0040.00815.72
7.1.270.0070.00715.88
7.1.260.0060.00616.00
7.1.250.0100.00615.68
7.1.240.0070.00715.89
7.1.230.0000.00915.75
7.1.220.0030.01015.94
7.1.210.0930.00914.63
7.1.200.0760.00914.57
7.1.190.0820.00514.52
7.1.180.0920.00914.55
7.1.170.0780.01014.67
7.1.160.0600.00314.56
7.1.150.0690.01014.64
7.1.140.1030.00614.69
7.1.130.1140.00414.56
7.1.120.1190.00414.63
7.1.110.1160.00714.49
7.1.100.0680.00714.63
7.1.90.1120.00814.70
7.1.80.1530.00414.61
7.1.70.1310.01014.63
7.1.60.1640.00926.69
7.1.50.1250.00726.63
7.1.40.1270.00926.39
7.1.30.1500.01126.52
7.1.20.1560.00926.46
7.1.10.1120.00514.54
7.1.00.1230.00914.62
7.0.330.0070.00415.57
7.0.320.0040.00415.64
7.0.310.0030.01015.47
7.0.300.0000.01215.56
7.0.290.0050.00515.69
7.0.280.0050.00215.27
7.0.270.0060.00915.60
7.0.260.0090.00315.44
7.0.250.0100.00315.69
7.0.240.0090.00615.64
7.0.230.0100.00715.25
7.0.220.0000.01315.52
7.0.210.0030.00715.39
7.0.200.0000.00815.52
7.0.190.0070.00715.64
7.0.180.0070.00715.30
7.0.170.0030.00615.56
7.0.160.0030.00715.64
7.0.150.0070.00415.47
7.0.140.0000.01415.85
7.0.130.0060.00315.74
7.0.120.0100.00015.50
7.0.110.0080.00015.62
7.0.100.0040.00715.65
7.0.90.0100.00315.57
7.0.80.0030.00515.68
7.0.70.0040.00415.63
7.0.60.0000.01015.66
7.0.50.0080.00515.77
7.0.40.0040.00413.58
7.0.30.0000.01213.56
7.0.20.0060.00313.55
7.0.10.0080.00013.70
7.0.00.0070.00313.78
5.6.400.0030.00814.00
5.6.390.0090.00314.71
5.6.380.0000.01214.56
5.6.370.0000.01514.16
5.6.360.0000.00814.38
5.6.350.0030.01014.43
5.6.340.0030.00614.20
5.6.330.0070.01013.94
5.6.320.0060.00614.12
5.6.310.0030.00714.10
5.6.300.0030.01014.56
5.6.290.0130.00014.69
5.6.280.0060.00614.20
5.6.270.0000.01514.37
5.6.260.0030.00914.23
5.6.250.0060.00914.36
5.6.240.0000.01114.59
5.6.230.0060.00314.28
5.6.220.0000.01014.15
5.6.210.0050.00514.18
5.6.200.0030.01014.45
5.6.190.0120.00314.41
5.6.180.0070.00714.23
5.6.170.0060.00914.57
5.6.160.0030.00514.14
5.6.150.0030.00714.45
5.6.140.0070.00714.56
5.6.130.0150.00314.23
5.6.120.0060.00914.21
5.6.110.0100.00614.39
5.6.100.0110.00414.21
5.6.90.0030.01314.46
5.6.80.0100.00714.07
5.6.70.0030.01014.29
5.6.60.0000.01214.35
5.6.50.0030.01014.19
5.6.40.0030.01314.21
5.6.30.0030.00614.35
5.6.20.0000.01214.32
5.6.10.0070.01014.11
5.6.00.0040.00714.03

preferences:
30.91 ms | 403 KiB | 5 Q