3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = [ 'nexus 7', 'nexus 5', 'nexus 57', ]; foreach($test as $string) { echo preg_replace(['~^(nexus)\s*(7)$~i', '~^(nexus).*+~i'], ['nexus 7', 'nexus'], $string), "\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.3.60.0060.01216.63
8.3.50.0070.01018.07
8.3.40.0040.01118.82
8.3.30.0060.01619.02
8.3.20.0050.00318.98
8.3.10.0050.00323.66
8.3.00.0000.00822.49
8.2.180.0140.00716.88
8.2.170.0110.00722.96
8.2.160.0070.00719.33
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0030.00522.38
8.2.120.0030.00526.35
8.2.110.0030.00722.17
8.2.100.0080.00319.82
8.2.90.0050.00317.83
8.2.80.0000.01117.97
8.2.70.0030.00917.75
8.2.60.0050.00317.93
8.2.50.0040.00418.10
8.2.40.0040.00422.46
8.2.30.0050.00519.18
8.2.20.0040.00417.89
8.2.10.0000.00818.07
8.2.00.0030.00617.81
8.1.280.0140.00425.92
8.1.270.0100.01022.13
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0040.00422.42
8.1.230.0090.00320.97
8.1.220.0000.00817.74
8.1.210.0090.00018.83
8.1.200.0050.00517.47
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0030.00618.68
8.1.160.0030.00522.11
8.1.150.0000.00718.86
8.1.140.0040.00419.59
8.1.130.0000.00717.63
8.1.120.0040.00417.58
8.1.110.0050.00317.49
8.1.100.0060.00317.50
8.1.90.0000.00817.63
8.1.80.0070.00017.57
8.1.70.0000.00717.62
8.1.60.0040.00417.75
8.1.50.0000.00817.56
8.1.40.0050.00617.65
8.1.30.0040.00417.71
8.1.20.0030.00617.76
8.1.10.0040.00417.65
8.1.00.0040.00417.55
8.0.300.0000.00819.86
8.0.290.0020.00516.88
8.0.280.0030.00318.37
8.0.270.0030.00317.20
8.0.260.0000.00717.02
8.0.250.0000.00717.01
8.0.240.0000.00617.06
8.0.230.0030.00317.09
8.0.220.0000.00716.90
8.0.210.0070.00017.07
8.0.200.0030.00317.09
8.0.190.0030.00516.96
8.0.180.0000.00817.03
8.0.170.0000.00817.01
8.0.160.0070.00017.04
8.0.150.0000.00716.86
8.0.140.0000.00817.02
8.0.130.0000.00613.49
8.0.120.0000.00816.86
8.0.110.0110.00317.06
8.0.100.0040.00417.09
8.0.90.0000.00717.11
8.0.80.0060.00916.99
8.0.70.0000.00717.07
8.0.60.0000.00716.87
8.0.50.0000.00816.90
8.0.30.0100.00917.24
8.0.20.0120.00717.40
8.0.10.0050.00317.26
8.0.00.0120.00916.83
7.4.330.0030.00315.08
7.4.320.0030.00316.69
7.4.300.0030.00316.65
7.4.290.0030.00316.81
7.4.280.0000.00716.84
7.4.270.0040.00416.82
7.4.260.0030.00316.78
7.4.250.0050.00316.59
7.4.240.0040.00416.60
7.4.230.0070.00016.80
7.4.220.0070.01116.85
7.4.210.0100.01016.81
7.4.200.0000.00716.54
7.4.160.0110.00516.65
7.4.150.0060.01217.40
7.4.140.0140.00717.86
7.4.130.0100.00716.74
7.4.120.0090.00916.71
7.4.110.0090.00816.91
7.4.100.0100.00716.71
7.4.90.0150.01116.75
7.4.80.0090.00819.39
7.4.70.0100.00716.62
7.4.60.0070.01016.59
7.4.50.0060.00916.64
7.4.40.0060.01216.71
7.4.30.0060.00916.87
7.4.10.0060.00915.33
7.4.00.0100.00715.15
7.3.330.0050.00313.29
7.3.320.0030.00313.25
7.3.310.0050.00416.32
7.3.300.0000.00716.27
7.3.290.0080.00716.40
7.3.280.0080.01016.41
7.3.270.0130.01017.40
7.3.260.0080.01116.58
7.3.250.0110.00816.64
7.3.240.0160.00516.63
7.3.230.0120.00616.39
7.3.210.0060.01016.64
7.3.200.0080.00816.35
7.3.190.0150.00416.43
7.3.180.0080.00816.65
7.3.170.0080.00816.56
7.3.160.0080.00816.84
7.3.130.0070.01015.25
7.3.120.0100.00615.02
7.3.110.0120.00614.97
7.3.100.0070.01015.07
7.3.90.0060.00915.21
7.3.80.0060.00314.73
7.3.70.0030.01014.88
7.3.60.0030.00915.09
7.3.50.0030.00615.14
7.3.40.0080.00414.95
7.3.30.0100.00714.75
7.3.20.0060.00317.04
7.3.10.0060.00316.71
7.3.00.0060.01016.76
7.2.330.0070.01016.95
7.2.320.0100.01016.83
7.2.310.0130.00416.62
7.2.300.0100.00616.75
7.2.290.0130.00316.74
7.2.260.0090.00915.25
7.2.250.0030.01315.23
7.2.240.0070.00715.38
7.2.230.0070.00715.13
7.2.220.0000.01315.36
7.2.210.0060.01015.20
7.2.200.0090.00615.10
7.2.190.0040.00714.96
7.2.180.0030.00615.26
7.2.170.0000.01515.25
7.2.160.0060.00615.34
7.2.150.0050.00517.16
7.2.140.0040.01116.68
7.2.130.0060.01017.27
7.2.120.0110.00417.07
7.2.110.0060.00316.99
7.2.100.0000.01617.02
7.2.90.0000.01417.14
7.2.80.0040.01117.08
7.2.70.0060.00916.75
7.2.60.0090.00617.07
7.2.50.0030.01017.07
7.2.40.0110.00317.19
7.2.30.0060.00616.71
7.2.20.0070.01017.09
7.2.10.0030.01216.84
7.2.00.0040.01118.17
7.1.330.0060.00615.99
7.1.320.0090.00615.95
7.1.310.0070.01116.00
7.1.300.0040.00715.86
7.1.290.0040.00815.73
7.1.280.0090.00315.95
7.1.270.0090.00916.14
7.1.260.0030.00715.92
7.1.250.0050.00515.91
7.1.240.0100.00715.67
7.1.230.0030.00715.98
7.1.220.0030.00616.14
7.1.210.0060.00615.89
7.1.200.0050.00715.79
7.1.190.0040.00816.11
7.1.180.0090.00616.04
7.1.170.0030.00616.11
7.1.160.0060.00616.07
7.1.150.0040.00815.93
7.1.140.0070.00315.68
7.1.130.0040.00715.86
7.1.120.0090.00615.93
7.1.110.0030.01015.71
7.1.100.0080.00617.17
7.1.90.0040.00816.15
7.1.80.0040.01115.92
7.1.70.0070.00416.39
7.1.60.0090.00316.79
7.1.50.0040.01115.71
7.1.40.0100.00715.95
7.1.30.0080.00316.09
7.1.20.0040.00715.99
7.1.10.0000.01215.84
7.1.00.0070.03819.25
7.0.330.0050.00515.55
7.0.320.0090.00615.13
7.0.310.0000.01015.64
7.0.300.0130.00015.68
7.0.290.0100.00315.54
7.0.280.0070.00715.80
7.0.270.0070.00715.64
7.0.260.0030.00915.73
7.0.250.0060.00915.62
7.0.240.0030.01215.75
7.0.230.0090.00915.36
7.0.220.0000.01315.62
7.0.210.0090.00315.79
7.0.200.0160.00815.40
7.0.190.0090.00315.76
7.0.180.0000.01515.48
7.0.170.0080.00315.79
7.0.160.0060.00615.40
7.0.150.0030.00615.32
7.0.140.0000.01215.68
7.0.130.0090.00315.73
7.0.120.0060.00615.58
7.0.110.0040.00415.47
7.0.100.0050.03417.77
7.0.90.0060.03217.83
7.0.80.0070.04717.70
7.0.70.0090.03617.80
7.0.60.0100.03017.82
7.0.50.0070.04317.98
7.0.40.0050.03516.95
7.0.30.0070.03716.96
7.0.20.0080.03216.92
7.0.10.0060.03217.02
7.0.00.0130.02817.00
5.6.400.0120.00313.98
5.6.390.0070.00714.14
5.6.380.0090.00014.50
5.6.370.0030.01314.58
5.6.360.0000.01214.43
5.6.350.0070.00714.63
5.6.340.0090.00613.98
5.6.330.0070.00314.52
5.6.320.0100.00714.02
5.6.310.0000.01214.41
5.6.300.0030.00614.66
5.6.290.0060.01213.99
5.6.280.0090.00614.30
5.6.270.0080.00414.08
5.6.260.0030.00614.42
5.6.250.0050.03617.64
5.6.240.0120.03017.52
5.6.230.0080.03017.56
5.6.220.0030.03717.33
5.6.210.0090.03017.58
5.6.200.0100.03017.83
5.6.190.0130.04117.78
5.6.180.0120.03017.68
5.6.170.0120.02917.71
5.6.160.0100.03317.64
5.6.150.0110.02817.62
5.6.140.0050.03517.60
5.6.130.0080.03917.61
5.6.120.0100.03117.69
5.6.110.0110.02917.64
5.6.100.0080.03317.84
5.6.90.0140.02517.69
5.6.80.0040.03617.28
5.6.70.0050.03317.31
5.6.60.0070.03017.43
5.6.50.0100.03417.19
5.6.40.0130.03517.28
5.6.30.0040.03217.31
5.6.20.0080.03217.37
5.6.10.0100.02817.45
5.6.00.0080.03117.34

preferences:
68.18 ms | 401 KiB | 5 Q