3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "hello"; echo preg_replace('/(.)(.*)(.)/', '$3$2$1', $string);

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.140.0130.01017.78
8.4.130.0100.01117.97
8.4.120.0150.00522.49
8.4.110.0130.00718.98
8.4.100.0110.00917.70
8.4.90.0130.00818.59
8.4.80.0120.00817.95
8.4.70.0120.00817.83
8.4.60.0120.00818.88
8.4.50.0160.00617.84
8.4.40.0070.00320.47
8.4.30.0100.01022.15
8.4.20.0160.00317.92
8.4.10.0160.00322.16
8.3.270.0110.00816.73
8.3.260.0090.00916.78
8.3.250.0110.00818.77
8.3.240.0020.00616.63
8.3.230.0080.01116.42
8.3.220.0060.00317.00
8.3.210.0130.00516.76
8.3.200.0060.00316.80
8.3.190.0140.00718.66
8.3.180.0060.00416.40
8.3.170.0090.00918.99
8.3.160.0070.01018.30
8.3.150.0070.00720.73
8.3.140.0110.00716.58
8.3.130.0160.00416.09
8.3.120.0030.00620.78
8.3.110.0000.00916.86
8.3.100.0070.01124.06
8.3.90.0070.00726.77
8.3.80.0060.00317.97
8.3.70.0060.01016.88
8.3.60.0120.00316.63
8.3.50.0160.00618.55
8.3.40.0130.00320.29
8.3.30.0100.01018.79
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0030.00726.16
8.2.290.0160.00320.30
8.2.280.0040.00518.74
8.2.270.0110.00416.94
8.2.260.0140.00018.98
8.2.250.0150.00018.40
8.2.240.0060.01217.36
8.2.230.0030.00520.94
8.2.220.0150.00637.54
8.2.210.0080.00026.77
8.2.200.0060.00316.63
8.2.190.0090.00616.88
8.2.180.0070.01118.29
8.2.170.0090.00622.96
8.2.160.0120.00322.96
8.2.150.0160.00325.66
8.2.140.0050.00324.66
8.2.130.0120.00326.16
8.2.120.0060.00317.88
8.2.110.0030.00620.92
8.2.100.0090.00318.03
8.2.90.0030.00617.87
8.2.80.0000.00818.88
8.2.70.0000.01017.63
8.2.60.0090.00917.63
8.2.50.0110.00817.23
8.2.40.0150.00317.73
8.2.30.0110.00717.75
8.2.20.0090.00917.63
8.2.10.0120.00417.48
8.2.00.0060.00917.50
8.1.330.0070.01122.04
8.1.320.0090.01016.28
8.1.310.0070.00416.49
8.1.300.0030.00518.07
8.1.290.0100.00030.84
8.1.280.0160.00625.92
8.1.270.0000.00824.66
8.1.260.0090.00026.35
8.1.250.0140.00028.09
8.1.240.0060.00323.97
8.1.230.0040.00819.07
8.1.220.0080.00017.79
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0130.00317.13
8.1.180.0080.01116.98
8.1.170.0160.00017.50
8.1.160.0120.00317.35
8.1.150.0130.00417.09
8.1.140.0090.00917.13
8.1.130.0120.00317.13
8.1.120.0110.00517.38
8.1.110.0140.00317.38
8.1.100.0090.00917.10
8.1.90.0110.00517.13
8.1.80.0170.00017.36
8.1.70.0030.01417.35
8.1.60.0160.00317.63
8.1.50.0110.00717.50
8.1.40.0160.00317.49
8.1.30.0060.01217.47
8.1.20.0190.00017.25
8.1.10.0070.01117.25
8.1.00.0070.01117.38
8.0.300.0070.00418.77
8.0.290.0000.00916.88
8.0.280.0130.00416.61
8.0.270.0170.00016.52
8.0.260.0110.00516.60
8.0.250.0080.00816.52
8.0.240.0100.00516.63
8.0.230.0080.00816.61
8.0.220.0080.00816.61
8.0.210.0100.00716.61
8.0.200.0150.00216.75
8.0.190.0170.00016.52
8.0.180.0130.00316.52
8.0.170.0150.00516.75
8.0.160.0100.00616.72
8.0.150.0110.00616.52
8.0.140.0160.00016.52
8.0.130.0110.00416.63
8.0.120.0160.00016.63
8.0.110.0170.00016.63
8.0.100.0160.00016.63
8.0.90.0130.00416.72
8.0.80.0150.00216.62
8.0.70.0160.00016.75
8.0.60.0130.00416.73
8.0.50.0120.00316.61
8.0.30.0140.00316.52
8.0.20.0150.00316.52
8.0.10.0160.00016.72

preferences:
26.49 ms | 403 KiB | 5 Q