3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "We have received ##AMOUNT## ##CURRENCY## for your OrderID n. ##ORDER_ID##"; $AMOUNT = 123; $CURRENCY = 'GBP'; $ORDER_ID = 20123; $find = ['##AMOUNT##','##CURRENCY##','##ORDER_ID##']; $replace = compact('AMOUNT', 'CURRENCY', 'ORDER_ID'); echo str_replace($find, $replace, $str);

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.1.70.0030.00517.39
8.1.60.0080.00017.51
8.1.50.0000.00817.35
8.1.40.0040.00417.53
8.1.30.0000.00917.62
8.1.20.0040.00417.50
8.1.10.0070.00017.42
8.1.00.0080.00017.36
8.0.200.0030.00316.88
8.0.190.0030.00316.79
8.0.180.0050.00316.86
8.0.170.0030.00616.87
8.0.160.0040.00416.88
8.0.150.0000.00816.76
8.0.140.0040.00416.69
8.0.130.0000.00513.20
8.0.120.0040.00416.83
8.0.110.0030.00516.68
8.0.100.0070.00016.63
8.0.90.0070.00016.86
8.0.80.0040.01516.84
8.0.70.0040.00416.77
8.0.60.0040.00416.87
8.0.50.0000.00816.90
8.0.30.0150.00517.06
8.0.20.0110.01017.24
8.0.10.0160.00617.01
8.0.00.0140.00516.82
7.4.300.0070.00016.44
7.4.290.0060.00316.59
7.4.280.0000.00716.55
7.4.270.0030.00316.56
7.4.260.0030.00316.54
7.4.250.0050.00316.53
7.4.240.0000.00816.47
7.4.230.0070.00016.45
7.4.220.0030.00316.59
7.4.210.0030.01216.61
7.4.200.0000.00716.34
7.4.160.0090.00716.48
7.4.150.0110.01016.74
7.4.140.0100.01017.35
7.4.130.0120.00816.43
7.4.120.0100.00916.41
7.4.110.0140.00616.40
7.4.100.0140.00516.47
7.4.90.0150.00416.39
7.4.80.0110.00917.45
7.4.70.0120.00616.39
7.4.60.0090.00916.33
7.4.50.0140.00616.31
7.4.40.0090.01216.33
7.4.30.0100.01016.33
7.4.20.0120.00916.25
7.4.10.0120.00915.89
7.4.00.0070.01115.41
7.3.330.0000.00512.93
7.3.320.0060.00013.02
7.3.310.0000.00716.24
7.3.300.0030.00316.16
7.3.290.0000.00716.11
7.3.280.0090.00816.16
7.3.270.0090.01016.56
7.3.260.0110.00716.21
7.3.250.0100.01016.33
7.3.240.0090.01016.29
7.3.230.0080.01316.23
7.3.220.0190.00116.13
7.3.210.0100.01016.11
7.3.200.0180.00216.17
7.3.190.0140.00616.35
7.3.180.0150.00416.29
7.3.170.0110.01016.15
7.3.160.0100.01016.22
7.3.150.0110.00916.10
7.3.140.0150.00616.24
7.3.130.0100.01115.82
7.3.120.0110.00815.44
7.3.110.0120.00715.41
7.3.100.0090.01015.42
7.3.90.0110.00815.46
7.3.80.0110.00715.56
7.3.70.0090.00915.26
7.3.60.0100.00715.25
7.3.50.0100.00715.15
7.3.40.0070.01015.16
7.3.30.0110.00715.14
7.3.20.0110.00815.95
7.3.10.0100.01015.98
7.3.00.0090.00815.94
7.2.340.0190.00716.26
7.2.330.0180.00516.51
7.2.320.0160.00716.41
7.2.310.0160.01016.40
7.2.300.0150.00816.31
7.2.290.0180.00616.49
7.2.280.0170.00616.46
7.2.270.0120.01416.31
7.2.260.0150.00816.06
7.2.250.0140.00715.67
7.2.240.0130.00815.64
7.2.230.0140.00715.58
7.2.220.0130.00815.75
7.2.210.0100.00915.58
7.2.200.0130.00815.46
7.2.190.0110.00615.45
7.2.180.0090.01015.47
7.2.170.0080.01115.54
7.2.160.0140.00815.61
7.2.150.0140.00816.10
7.2.140.0140.00916.09
7.2.130.0110.00916.13
7.2.120.0140.01016.07
7.2.110.0170.00816.08
7.2.100.0160.01016.16
7.2.90.0140.00816.08
7.2.80.0160.00816.13
7.2.70.0150.00816.07
7.2.60.0130.00816.16
7.2.50.0290.00816.09
7.2.40.0150.00916.10
7.2.30.0120.01116.17
7.2.20.0190.00716.17
7.2.10.0220.01016.41
7.2.00.0130.00816.30
7.1.330.0140.00715.23
7.1.320.0190.00815.18
7.1.310.0140.00815.20
7.1.300.0120.00914.96
7.1.290.0150.00714.98
7.1.280.0100.01114.97
7.1.270.0130.00815.04
7.1.260.0130.00914.94
7.1.250.0130.01014.78
7.1.240.0170.00614.80
7.1.230.0160.00714.92
7.1.220.0150.00914.84
7.1.210.0220.00814.82
7.1.200.0180.00714.94
7.1.190.0160.00814.81
7.1.180.0150.00814.76
7.1.170.0170.00514.79
7.1.160.0150.00814.90
7.1.150.0170.00714.84
7.1.140.0140.00814.80
7.1.130.0140.00914.86
7.1.120.0170.00415.02
7.1.110.0180.00915.09
7.1.100.0180.00515.10
7.1.90.0160.00915.09
7.1.80.0170.00715.12
7.1.70.0200.00714.97
7.1.60.0200.01017.52
7.1.50.0200.01117.51
7.1.40.0310.01117.38
7.1.30.0200.00817.42
7.1.20.0210.00817.41
7.1.10.0170.01014.84
7.1.00.0210.00614.89
7.0.330.0200.00514.56
7.0.320.0200.00514.66
7.0.310.0150.01014.68
7.0.300.0180.00814.67
7.0.290.0210.01014.55
7.0.280.0210.00614.60
7.0.270.0250.00314.66
7.0.260.0160.00814.99
7.0.250.0190.00614.97
7.0.240.0190.00815.00
7.0.230.0140.01115.04
7.0.220.0140.00914.99
7.0.210.0190.00714.78
7.0.200.0160.00914.78
7.0.190.0190.00614.78
7.0.180.0470.01114.63
7.0.170.0150.00814.72
7.0.160.0180.00614.72
7.0.150.0170.00814.68
7.0.140.0190.00814.62
7.0.130.0190.00714.70
7.0.120.0200.00614.71
7.0.110.0190.00714.68
7.0.100.0160.00914.69
7.0.90.0220.00614.60
7.0.80.0170.00914.65
7.0.70.0180.00814.65
7.0.60.0150.00714.55
7.0.50.0160.00814.64
7.0.40.0180.00614.68
7.0.30.0200.00614.75
7.0.20.0140.01114.65
7.0.10.0160.00814.66
7.0.00.0150.00914.68
5.6.400.0150.00814.97
5.6.390.0170.00614.90
5.6.380.0130.01014.95
5.6.370.0140.01315.34
5.6.360.0130.01415.39
5.6.350.0170.00815.46
5.6.340.0170.01015.51
5.6.330.0150.01115.36
5.6.320.0190.00715.51
5.6.310.0190.00915.46
5.6.300.0160.02116.51
5.6.290.0150.02116.44
5.6.280.0140.02116.54
5.6.270.0170.01916.51
5.6.260.0160.01916.45
5.6.250.0180.01916.41
5.6.240.0200.01816.45
5.6.230.0170.02016.54
5.6.220.0160.01916.54
5.6.210.0190.01716.47
5.6.200.0240.01216.45
5.6.190.0180.02216.51
5.6.180.0160.02016.50
5.6.170.0180.01716.40
5.6.160.0170.01816.49
5.6.150.0130.02016.37
5.6.140.0160.02016.41
5.6.130.0160.01816.43
5.6.120.0160.01916.53
5.6.110.0140.02116.49
5.6.100.0170.01916.43
5.6.90.0200.01716.49
5.6.80.0170.01716.38
5.6.70.0150.01816.29
5.6.60.0120.02116.23
5.6.50.0160.01716.27
5.6.40.0120.02216.24
5.6.30.0190.01416.27
5.6.20.0200.01916.26
5.6.10.0170.01916.25
5.6.00.0140.02016.32
5.5.380.0190.01115.30
5.5.370.0130.01515.32
5.5.360.0170.00915.25
5.5.350.0120.01515.14
5.5.340.0150.01015.37
5.5.330.0160.00915.20
5.5.320.0220.00515.25
5.5.310.0190.00715.33
5.5.300.0200.00815.06
5.5.290.0160.01115.17
5.5.280.0210.00515.04
5.5.270.0180.00915.27
5.5.260.0170.01215.19
5.5.250.0200.00715.17
5.5.240.0160.00815.34
5.5.230.0150.01115.11
5.5.220.0180.00815.14
5.5.210.0150.01115.25
5.5.200.0160.00715.14
5.5.190.0150.00915.13
5.5.180.0110.01415.13
5.5.170.0150.01015.13
5.5.160.0170.00715.17
5.5.150.0200.00415.11
5.5.140.0150.01115.26
5.5.130.0120.01215.11
5.5.120.0180.00615.07
5.5.110.0140.01115.24
5.5.100.0170.00915.29
5.5.90.0140.01115.20
5.5.80.0170.00815.26
5.5.70.0140.01215.13
5.5.60.0140.01215.26
5.5.50.0150.01015.23
5.5.40.0180.00615.24
5.5.30.0180.00715.25
5.5.20.0160.00915.22
5.5.10.0200.00515.07
5.5.00.0160.00715.09
5.4.450.0110.00912.63
5.4.440.0100.01012.63
5.4.430.0090.01112.59
5.4.420.0140.00512.61
5.4.410.0140.00512.61
5.4.400.0130.00512.60
5.4.390.0170.00312.50
5.4.380.0110.00612.60
5.4.370.0140.00512.62
5.4.360.0120.00612.56
5.4.350.0140.00712.52
5.4.340.0100.01012.57
5.4.330.0090.01012.58
5.4.320.0120.00612.58
5.4.310.0110.00712.64
5.4.300.0100.00712.62
5.4.290.0100.00812.59
5.4.280.0090.00912.53
5.4.270.0150.00512.56
5.4.260.0100.00812.64
5.4.250.0130.00612.57
5.4.240.0140.00912.51
5.4.230.0120.00612.47
5.4.220.0130.00412.46
5.4.210.0130.00712.45
5.4.200.0110.00912.52
5.4.190.0130.00612.48
5.4.180.0140.00612.52
5.4.170.0120.00812.46
5.4.160.0150.00612.50
5.4.150.0120.00612.57
5.4.140.0130.00712.56
5.4.130.0120.00612.61
5.4.120.0140.00412.60
5.4.110.0100.00812.65
5.4.100.0130.00612.56
5.4.90.0130.00412.58
5.4.80.0100.00712.56
5.4.70.0100.00812.67
5.4.60.0100.00612.65
5.4.50.0160.00212.59
5.4.40.0140.00312.67
5.4.30.0130.00512.68
5.4.20.0140.00712.68
5.4.10.0130.00712.65
5.4.00.0110.00812.56
5.3.290.0100.00712.75
5.3.280.0120.00612.61
5.3.270.0120.00612.69
5.3.260.0140.00812.79
5.3.250.0100.01012.67
5.3.240.0100.00712.61
5.3.230.0130.00512.73
5.3.220.0130.00412.65
5.3.210.0130.00712.65
5.3.200.0130.00612.70
5.3.190.0130.00512.65
5.3.180.0110.00912.74
5.3.170.0080.00912.80
5.3.160.0120.00612.81
5.3.150.0100.00912.82
5.3.140.0140.00712.73
5.3.130.0150.00612.77
5.3.120.0130.00712.81
5.3.110.0090.00912.82
5.3.100.0140.00612.76
5.3.90.0140.00712.83
5.3.80.0110.00812.80
5.3.70.0130.00512.72
5.3.60.0120.00712.79
5.3.50.0140.00712.68
5.3.40.0110.00712.74
5.3.30.0110.00512.70
5.3.20.0130.00712.73
5.3.10.0100.00612.67
5.3.00.0100.00712.52
5.2.170.0100.00412.33
5.2.160.0110.00512.32
5.2.150.0110.00412.29
5.2.140.0100.00612.29
5.2.130.0100.00712.29
5.2.120.0100.00512.25
5.2.110.0120.00412.28
5.2.100.0120.00412.26
5.2.90.0110.00412.31
5.2.80.0110.00512.32
5.2.70.0130.00312.27
5.2.60.0090.00512.24
5.2.50.0090.00712.29
5.2.40.0100.00612.27
5.2.30.0100.00612.30
5.2.20.0100.00712.22
5.2.10.0070.00612.18
5.2.00.0100.00412.14
5.1.60.0080.00512.12
5.1.50.0100.00312.12
5.1.40.0100.00312.12
5.1.30.0080.00612.12
5.1.20.0080.00612.12
5.1.10.0090.00512.12
5.1.00.0090.00512.12
5.0.50.0070.00412.12
5.0.40.0060.00512.12
5.0.30.0050.00512.12
5.0.20.0040.00812.12
5.0.10.0070.00712.12
5.0.00.0050.00712.12
4.4.90.0040.00412.12
4.4.80.0050.00412.12
4.4.70.0050.00412.12
4.4.60.0040.00312.12
4.4.50.0050.00312.12
4.4.40.0040.00412.12
4.4.30.0040.00412.12
4.4.20.0050.00312.12
4.4.10.0050.00412.12
4.4.00.0060.00112.12
4.3.110.0070.00012.12
4.3.100.0050.00212.12
4.3.90.0050.00312.12
4.3.80.0040.00412.12
4.3.70.0030.00412.12
4.3.60.0030.00512.12
4.3.50.0080.00112.12
4.3.40.0030.00412.12
4.3.30.0020.00612.12
4.3.20.0000.00612.12
4.3.10.0040.00312.12
4.3.00.0060.00112.12

preferences:
13.71 ms | 406 KiB | 5 Q