3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string="{1},[2],(3),<4>"; // Replaces closing square, curly, angle brackets with round brackets $string = preg_replace('/[{[<]/', '(', $string); $string = preg_replace('/[}>\]]/', ')', $string); echo $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.120.0110.00720.38
8.4.110.0130.00718.60
8.4.100.0130.00618.16
8.4.90.0100.01017.69
8.4.80.0070.00218.11
8.4.70.0060.00217.95
8.4.60.0130.00918.64
8.4.50.0130.00917.99
8.4.40.0030.00718.01
8.4.30.0090.00622.43
8.4.20.0130.00624.22
8.4.10.0040.00717.75
8.3.250.0110.00718.84
8.3.240.0080.00416.61
8.3.230.0100.00916.57
8.3.220.0100.00817.13
8.3.210.0130.00616.57
8.3.200.0060.00316.61
8.3.190.0050.00318.69
8.3.180.0110.00816.99
8.3.170.0150.00416.66
8.3.160.0110.00716.70
8.3.150.0140.00718.79
8.3.140.0050.00318.79
8.3.130.0040.00418.39
8.3.120.0030.00618.91
8.3.110.0040.01120.94
8.3.100.0080.00024.06
8.3.90.0080.00026.77
8.3.80.0060.00318.39
8.3.70.0060.00918.43
8.3.60.0150.00618.30
8.3.50.0120.00616.61
8.3.40.0030.01819.02
8.3.30.0110.00718.85
8.3.20.0040.00421.90
8.3.10.0080.00021.78
8.3.00.0000.00723.66
8.2.290.0120.00720.29
8.2.280.0030.00518.74
8.2.270.0150.00316.95
8.2.260.0150.00318.98
8.2.250.0140.00317.11
8.2.240.0110.00718.81
8.2.230.0040.00422.58
8.2.220.0040.00437.54
8.2.210.0030.00626.77
8.2.200.0040.00818.78
8.2.190.0120.00616.63
8.2.180.0090.00916.63
8.2.170.0120.00322.96
8.2.160.0120.00321.27
8.2.150.0070.00025.66
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0030.00526.16
8.2.110.0070.00321.04
8.2.100.0030.01018.03
8.2.90.0030.00617.75
8.2.80.0000.00819.40
8.2.70.0040.00717.93
8.2.60.0040.00418.09
8.2.50.0060.00318.10
8.2.40.0000.00720.50
8.2.30.0000.00719.22
8.2.20.0040.00418.05
8.2.10.0040.00419.42
8.2.00.0050.00319.32
8.1.330.0140.00821.80
8.1.320.0120.00715.97
8.1.310.0000.01018.60
8.1.300.0090.00620.10
8.1.290.0040.00818.88
8.1.280.0100.01325.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00019.34
8.1.230.0060.00622.17
8.1.220.0000.00817.77
8.1.210.0060.00318.77
8.1.200.0040.00417.48
8.1.190.0040.00417.36
8.1.180.0000.00918.10
8.1.170.0000.00818.71
8.1.160.0040.00418.82
8.1.150.0030.00518.83
8.1.140.0040.00418.79
8.1.130.0000.00720.13
8.1.120.0070.00017.42
8.1.110.0030.00717.49
8.1.100.0000.00817.37
8.1.90.0070.00017.43
8.1.80.0050.00317.52
8.1.70.0000.00717.54
8.1.60.0040.00417.66
8.1.50.0040.00417.57
8.1.40.0030.00617.49
8.1.30.0040.00417.66
8.1.20.0000.00817.70
8.1.10.0050.00317.62
8.1.00.0040.00417.57
8.0.300.0070.00019.85
8.0.290.0040.00416.75
8.0.280.0000.00618.36
8.0.270.0070.00016.91
8.0.260.0000.00718.45
8.0.250.0030.00317.07
8.0.240.0040.00417.02
8.0.230.0000.00716.91
8.0.220.0070.00016.92
8.0.210.0070.00016.79
8.0.200.0040.00417.04
8.0.190.0080.00017.05
8.0.180.0070.00016.93
8.0.170.0000.00816.90
8.0.160.0040.00416.86
8.0.150.0040.00416.97
8.0.140.0040.00416.83
8.0.130.0030.00313.36
8.0.120.0040.00416.93
8.0.110.0030.00516.99
8.0.100.0070.00017.07
8.0.90.0000.00717.00
8.0.80.0150.00416.95
8.0.70.0000.00816.81
8.0.60.0040.00416.98
8.0.50.0040.00416.82
8.0.30.0030.01617.42
8.0.20.0060.01217.01
8.0.10.0080.00016.90
8.0.00.0080.01016.97
7.4.330.0000.00515.55
7.4.320.0000.00716.72
7.4.300.0030.00316.69
7.4.290.0000.00716.71
7.4.280.0050.00216.64
7.4.270.0030.00316.64
7.4.260.0000.00816.62
7.4.250.0000.00716.62
7.4.240.0050.00216.64
7.4.230.0000.00716.44
7.4.220.0050.00316.80
7.4.210.0030.01116.69
7.4.200.0070.00016.80
7.4.160.0110.00516.52
7.4.140.0140.00717.86
7.4.130.0140.00316.57
7.4.120.0060.01016.81
7.4.110.0060.01016.43
7.4.100.0070.01016.48
7.4.90.0100.00716.67
7.4.80.0180.00419.39
7.4.70.0120.00616.57
7.4.60.0090.00916.87
7.4.50.0030.01316.43
7.4.40.0060.01216.48
7.4.10.0140.00314.93
7.4.00.0130.00515.01
7.3.330.0000.00613.08
7.3.320.0030.00313.09
7.3.310.0070.00016.30
7.3.300.0000.00716.21
7.3.290.0050.00216.38
7.3.280.0060.01016.37
7.3.260.0120.00616.44
7.3.240.0080.01216.45
7.3.230.0060.01116.33
7.3.210.0160.00016.38
7.3.200.0030.01316.35
7.3.190.0060.00916.55
7.3.180.0100.01016.25
7.3.170.0120.01016.36
7.3.160.0080.01216.55
7.3.130.0000.01514.97
7.3.120.0070.00715.18
7.3.110.0030.01614.54
7.3.100.0040.01114.88
7.3.90.0040.01114.98
7.3.80.0030.01214.94
7.3.70.0030.00714.59
7.3.60.0080.00814.97
7.3.50.0140.00314.90
7.3.40.0040.01314.74
7.3.30.0110.00914.83
7.3.20.0120.00515.85
7.3.10.0130.00815.66
7.3.00.0050.01215.89
7.2.330.0140.00316.73
7.2.320.0030.01416.49
7.2.310.0120.00316.67
7.2.300.0110.01116.66
7.2.290.0140.00416.69
7.2.260.0090.00615.00
7.2.250.0110.00715.34
7.2.240.0040.01215.03
7.2.230.0070.00715.33
7.2.220.0000.02014.96
7.2.210.0030.00615.16
7.2.200.0030.01415.30
7.2.190.0090.01114.85
7.2.180.0100.00914.93
7.2.170.0120.01315.00
7.2.160.0150.00214.92
7.2.150.0140.00916.17
7.2.140.0150.00716.08
7.2.130.0160.00716.00
7.2.120.0240.01016.18
7.2.110.0150.00916.12
7.2.100.0140.00715.93
7.2.90.0130.00616.14
7.2.80.0090.00916.07
7.2.70.0100.00915.95
7.2.60.0080.01115.99
7.2.50.0160.00416.05
7.2.40.0130.00616.08
7.2.30.0120.00915.97
7.2.20.0150.00415.94
7.2.10.0100.01016.08
7.2.00.0050.01516.08
7.1.330.0080.00615.90
7.1.320.0110.00416.14
7.1.310.0090.00315.98
7.1.300.0120.00615.02
7.1.290.0130.00814.99
7.1.280.0130.00814.87
7.1.270.0090.00814.96
7.1.260.0040.01315.09
7.1.250.0080.00414.78
7.1.240.0040.00816.13
7.1.230.0000.01216.07
7.1.220.0030.00616.01
7.1.210.0070.00715.93
7.1.200.0110.00316.15
7.1.190.0000.00815.98
7.1.180.0040.00715.94
7.1.170.0070.00415.67
7.1.160.0130.00316.02
7.1.150.0100.00316.06
7.1.140.0000.01415.95
7.1.130.0000.01415.92
7.1.120.0070.00716.02
7.1.110.0000.01216.06
7.1.100.0030.01015.91
7.1.90.0090.00316.03
7.1.80.0070.00715.87
7.1.70.0100.00715.78
7.1.60.0000.01316.10
7.1.50.0030.00715.92
7.1.40.0060.00616.11
7.1.30.0100.00015.93
7.1.20.0000.01215.99
7.1.10.0070.00715.95
7.1.00.0030.01315.99

preferences:
128.85 ms | 403 KiB | 5 Q