3v4l.org

run code in 300+ PHP versions simultaneously
<?php $wordsList = [ ['frog', 'Nock'], // All search strings ['sock', 'crock'], // All replacements ]; $message = str_replace( $wordsList[0], // All search strings $wordsList[1], // The replacements strings "frog frog Nock Nock" ); echo $message;

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.5.00.0160.00719.79
8.4.150.0030.00014.05
8.4.140.0080.01217.57
8.4.130.0090.01218.67
8.4.120.0090.00824.01
8.4.110.0110.00918.77
8.4.100.0110.00918.86
8.4.90.0130.00720.43
8.4.80.0100.00922.48
8.4.70.0130.00717.89
8.4.60.0100.00618.66
8.4.50.0110.01117.60
8.4.40.0070.01317.60
8.4.30.0070.01420.40
8.4.20.0060.00317.98
8.4.10.0040.00419.74
8.3.280.0110.00918.39
8.3.270.0140.00516.59
8.3.260.0080.01216.36
8.3.250.0050.00219.04
8.3.240.0110.00516.97
8.3.230.0070.00416.49
8.3.220.0100.00718.91
8.3.210.0070.00816.51
8.3.200.0080.00116.48
8.3.190.0090.00617.20
8.3.180.0110.00816.53
8.3.170.0060.00316.56
8.3.160.0150.00316.54
8.3.150.0040.01518.79
8.3.140.0080.00018.96
8.3.130.0080.00818.46
8.3.120.0050.00318.81
8.3.110.0050.00320.94
8.3.100.0080.00016.78
8.3.90.0070.00426.77
8.3.80.0080.00316.63
8.3.70.0070.00716.75
8.3.60.0080.00818.18
8.3.50.0070.00718.13
8.3.40.0100.01021.71
8.3.30.0100.00618.67
8.3.20.0050.00224.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.290.0030.00622.15
8.2.280.0130.00618.25
8.2.270.0110.00616.46
8.2.260.0080.00016.36
8.2.250.0120.00318.34
8.2.240.0110.00719.07
8.2.230.0130.00722.58
8.2.220.0100.00024.06
8.2.210.0040.00426.77
8.2.200.0090.00016.75
8.2.190.0040.01116.63
8.2.180.0190.00325.92
8.2.170.0070.01318.95
8.2.160.0070.00722.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00720.96
8.2.110.0070.00319.17
8.2.100.0070.00717.72
8.2.90.0040.00417.63
8.2.80.0030.00718.91
8.2.70.0060.00317.50
8.2.60.0060.00318.05
8.2.50.0000.00918.07
8.2.40.0030.00619.88
8.2.30.0040.00418.01
8.2.20.0040.00418.13
8.2.10.0070.00019.24
8.2.00.0070.00019.22
8.1.330.0090.00921.66
8.1.320.0120.00415.98
8.1.310.0070.01118.26
8.1.300.0080.00017.88
8.1.290.0030.00630.84
8.1.280.0060.01225.92
8.1.270.0060.00323.99
8.1.260.0090.00026.35
8.1.250.0060.00328.09
8.1.240.0090.00019.52
8.1.230.0070.00417.89
8.1.220.0030.00517.76
8.1.210.0000.00818.77
8.1.200.0000.00917.23
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0050.00218.59
8.1.160.0000.00718.88
8.1.150.0060.00318.57
8.1.140.0080.00020.84
8.1.130.0000.00718.95
8.1.120.0070.00017.38
8.1.110.0030.00317.33
8.1.100.0070.00017.36
8.1.90.0040.00417.37
8.1.80.0080.00017.43
8.1.70.0000.00717.31
8.1.60.0040.00817.48
8.1.50.0000.00817.46
8.1.40.0000.00817.45
8.1.30.0040.00417.54
8.1.20.0060.00317.50
8.1.10.0000.00717.51
8.1.00.0000.00817.56
8.0.300.0000.00718.84
8.0.290.0040.00416.63
8.0.280.0000.00718.45
8.0.270.0040.00418.02
8.0.260.0030.00318.53
8.0.250.0000.00716.95
8.0.240.0040.00416.94
8.0.230.0000.00816.76
8.0.220.0000.00716.79
8.0.210.0030.00316.85
8.0.200.0030.00316.85
8.0.190.0070.00016.76
8.0.180.0070.00016.77
8.0.170.0000.00816.86
8.0.160.0040.00416.74
8.0.150.0030.00316.72
8.0.140.0000.00716.80
8.0.130.0050.00013.24
8.0.120.0030.00516.78
8.0.110.0030.00316.79
8.0.100.0070.00016.74
8.0.90.0000.00716.70
8.0.80.0040.00416.67
8.0.70.0040.00416.86
8.0.60.0070.00016.89
8.0.50.0050.00316.83
8.0.30.0050.00316.89
8.0.20.0080.00016.73
8.0.10.0000.00816.98
8.0.00.0000.00817.03
7.4.330.0050.00015.55
7.4.320.0000.00616.39
7.4.300.0000.00616.55
7.4.290.0000.00716.39
7.4.280.0050.00516.52
7.4.270.0000.00816.45
7.4.260.0000.00513.18
7.4.250.0030.00316.48
7.4.240.0070.00016.52
7.4.230.0050.00216.62
7.4.220.0040.00416.57
7.4.210.0000.00816.52
7.4.200.0080.00016.38
7.4.190.0040.00416.35
7.4.180.0000.00716.37
7.4.160.0050.00516.53
7.4.150.0070.00016.28
7.4.140.0000.00616.51
7.4.130.0000.00616.48
7.4.120.0000.00616.40
7.4.110.0040.00416.31
7.4.100.0030.00316.21
7.4.90.0030.00316.12
7.4.80.0030.00316.30
7.4.70.0030.00316.30
7.4.60.0000.00716.48
7.4.50.0000.00716.34
7.4.40.0030.00316.22
7.4.30.0030.00316.23
7.4.20.0000.00716.47
7.4.10.0060.00016.45
7.4.00.0000.00616.30
7.3.330.0030.00416.29
7.3.320.0030.00313.19
7.3.310.0000.00916.02
7.3.300.0030.00316.29
7.3.290.0070.00016.30
7.3.280.0030.00316.18
7.3.270.0040.00416.31
7.3.260.0040.00416.24
7.3.250.0070.00016.24
7.3.240.0000.00616.30
7.3.230.0060.00016.18
7.3.220.0060.00016.24
7.3.210.0040.00416.21
7.3.200.0060.00016.18
7.3.190.0060.00016.21
7.3.180.0040.00416.12
7.3.170.0040.00416.19
7.3.160.0040.00416.23
7.3.150.0000.00716.19
7.3.140.0000.00616.21
7.3.130.0000.00716.05
7.3.120.0030.00316.26
7.3.110.0000.00716.12
7.3.100.0040.00416.17
7.3.90.0030.00316.50
7.3.80.0030.00316.24
7.3.70.0030.00316.16
7.3.60.0030.00316.25
7.3.50.0070.00016.39
7.3.40.0000.00616.28
7.3.30.0060.00016.31
7.3.20.0000.00716.39
7.3.10.0030.00316.15
7.3.00.0000.00716.40

preferences:
30.61 ms | 403 KiB | 5 Q