3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = [':foo' => null]; $sql = 'select * from test where foo = :foo'; $sql = preg_replace_callback( '/(?<!\b)(?<![:\\\]):(#?[a-zA-Z0-9_-]+)/', function ($match) use ($params) { return $params[$match[1]]; }, $sql ); var_dump($sql);

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.130.0080.00818.74
8.3.120.0090.00919.05
8.3.110.0090.00020.94
8.3.100.0030.00616.76
8.3.90.0040.00426.77
8.3.80.0060.00316.88
8.3.70.0150.00016.88
8.3.60.0070.00716.88
8.3.50.0150.00020.43
8.3.40.0060.01220.17
8.3.30.0070.00719.13
8.3.20.0050.00324.18
8.3.10.0110.00424.66
8.3.00.0050.00326.16
8.2.250.0040.00418.67
8.2.240.0130.00719.11
8.2.230.0130.00322.58
8.2.220.0060.00324.06
8.2.210.0030.00926.77
8.2.200.0040.00418.79
8.2.190.0170.00316.74
8.2.180.0040.01125.92
8.2.170.0110.00419.21
8.2.160.0000.01422.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00726.16
8.2.110.0110.00721.04
8.2.100.0080.00418.28
8.2.90.0060.00318.06
8.2.80.0080.00017.97
8.2.70.0060.00317.88
8.2.60.0060.00317.92
8.2.50.0000.00818.07
8.2.40.0080.00018.34
8.2.30.0040.00418.25
8.2.20.0050.00220.35
8.2.10.0000.00718.20
8.2.00.0040.00419.34
8.1.300.0100.01017.97
8.1.290.0090.00030.84
8.1.280.0120.00325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0030.00622.79
8.1.230.0040.00720.84
8.1.220.0050.00317.89
8.1.210.0030.00618.83
8.1.200.0060.00317.48
8.1.190.0080.00017.60
8.1.180.0000.00818.10
8.1.170.0040.00418.65
8.1.160.0040.00418.99
8.1.150.0080.00018.73
8.1.140.0000.00817.62
8.1.130.0000.00719.04
8.1.120.0000.00817.69
8.1.110.0040.00417.56
8.1.100.0030.00517.68
8.1.90.0000.00817.62
8.1.80.0040.00417.62
8.1.70.0070.00017.52
8.1.60.0040.00417.77
8.1.50.0000.00817.67
8.1.40.0280.00017.53
8.1.30.0180.00917.65
8.1.20.0210.00417.81
8.1.10.0130.00717.70
8.1.00.0100.00517.25
8.0.300.0070.00020.00
8.0.290.0040.00416.88
8.0.280.0030.00318.39
8.0.270.0030.00317.05
8.0.260.0060.00018.47
8.0.250.0000.00817.09
8.0.240.0030.00317.17
8.0.230.0030.00317.15
8.0.220.0040.00417.24
8.0.210.0030.00517.15
8.0.200.0030.00317.06
8.0.190.0080.00017.18
8.0.180.0040.00417.14
8.0.170.0130.00316.89
8.0.160.0060.00617.00
8.0.150.0080.00417.00
8.0.140.0150.00017.07
8.0.130.0030.00716.96
8.0.120.0140.00317.03
8.0.110.0160.00517.07
8.0.100.0120.01217.18
8.0.90.0190.00317.09
8.0.80.0190.00317.21
8.0.70.0180.00417.08
8.0.60.0110.01117.04
8.0.50.0080.01217.15
8.0.30.0200.00417.11
8.0.20.0210.00017.11
8.0.10.0140.00617.30
7.4.330.0020.00215.55
7.4.320.0040.00416.77
7.4.300.0030.00316.77
7.4.290.0000.00816.72
7.4.280.0150.00616.88
7.4.270.0070.00716.89
7.4.260.0150.00016.70
7.4.250.0170.00016.89
7.4.240.0170.00816.79
7.4.230.0160.00816.74
7.4.220.0140.00716.90
7.4.210.0170.00316.76
7.4.200.0180.00516.75
7.4.190.0180.00416.72
7.4.180.0160.00716.86
7.4.160.0200.00316.86
7.4.150.0100.00516.77
7.4.140.0110.00416.49
7.4.130.0120.00316.74
7.4.120.0170.00016.75
7.4.110.0100.00716.44
7.4.100.0090.00616.47
7.4.90.0110.00516.41
7.4.80.0080.00816.64
7.4.70.0150.00016.49
7.4.60.0110.00416.59
7.4.50.0110.00416.57
7.4.40.0100.00716.68
7.4.30.0160.00016.50
7.4.20.0100.00516.72
7.4.10.0090.00516.54
7.4.00.0070.00716.61

preferences:
52.77 ms | 403 KiB | 5 Q