3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\bsite_[a-zA-Z0-9]*/'; $query = 'SELECT * FROM site_customers LEFT JOIN site_products'; preg_match_all($re, $query, $matches, PREG_SET_ORDER, 0); // Print the entire match result var_dump($matches); // Replace old tables with new ones $old = [ $matches[0][0], // First table name $matches[1][0], // Second table name ]; $new = [ $matches[0][0] . '_02', // Append _02 'new_' . $matches[1][0], // Prepand new_ ]; $query = str_replace($old, $new, $query); // Print the new query echo $query;

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.10.0120.00616.65
8.5.00.0150.00720.16
8.4.150.0020.00014.05
8.4.140.0110.01017.98
8.4.130.0050.00318.78
8.4.120.0050.00423.85
8.4.110.0140.00618.90
8.4.100.0130.00718.64
8.4.90.0040.00420.48
8.4.80.0090.00218.51
8.4.70.0040.00417.91
8.4.60.0110.00918.78
8.4.50.0120.01023.39
8.4.40.0100.01019.64
8.4.30.0060.00319.67
8.4.20.0070.00318.78
8.4.10.0050.00518.20
8.3.280.0130.00718.54
8.3.270.0140.00516.68
8.3.260.0090.01016.52
8.3.250.0130.00718.74
8.3.240.0050.00317.01
8.3.230.0110.00816.76
8.3.220.0090.01119.11
8.3.210.0090.01018.42
8.3.200.0060.00316.45
8.3.190.0090.01016.95
8.3.180.0140.00616.67
8.3.170.0130.00319.00
8.3.160.0140.00316.77
8.3.150.0090.00917.29
8.3.140.0030.00617.30
8.3.130.0040.01118.52
8.3.120.0150.00418.93
8.3.110.0040.01520.94
8.3.100.0060.00318.71
8.3.90.0140.00326.77
8.3.80.0100.00017.97
8.3.70.0070.00716.38
8.3.60.0110.00418.42
8.3.50.0100.00718.38
8.3.40.0120.00418.98
8.3.30.0150.00018.96
8.3.20.0070.00021.85
8.3.10.0040.00423.44
8.3.00.0080.00023.66
8.2.290.0110.00820.36
8.2.280.0130.00618.39
8.2.270.0070.00717.40
8.2.260.0110.00716.85
8.2.250.0080.00016.87
8.2.240.0100.00617.36
8.2.230.0090.00022.58
8.2.220.0060.00324.06
8.2.210.0080.01226.77
8.2.200.0030.00718.54
8.2.190.0070.00720.41
8.2.180.0070.00718.54
8.2.170.0080.00822.96
8.2.160.0140.00320.56
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00018.09
8.2.120.0040.00426.35
8.2.110.0040.00820.99
8.2.100.0120.00018.03
8.2.90.0040.00419.17
8.2.80.0060.00317.97
8.2.70.0060.00317.63
8.2.60.0030.00517.75
8.2.50.0040.00417.88
8.2.40.0000.00819.30
8.2.30.0050.00219.41
8.2.20.0000.00818.05
8.2.10.0000.00719.34
8.2.00.0070.00019.43
8.1.330.0110.00822.00
8.1.320.0100.00916.32
8.1.310.0030.00718.34
8.1.300.0030.00720.11
8.1.290.0000.00930.84
8.1.280.0120.00625.92
8.1.270.0080.00018.84
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0030.00622.62
8.1.230.0040.00717.91
8.1.220.0040.00417.78
8.1.210.0050.00318.77
8.1.200.0030.00717.35
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0090.00018.84
8.1.160.0070.00018.90
8.1.150.0040.00418.88
8.1.140.0000.00722.13
8.1.130.0000.00720.22
8.1.120.0000.00717.66
8.1.110.0050.00517.56
8.1.100.0080.00017.60
8.1.90.0070.00017.60
8.1.80.0030.00317.50
8.1.70.0030.00317.59
8.1.60.0050.00317.76
8.1.50.0000.00817.57
8.1.40.0000.00817.52
8.1.30.0000.00817.73
8.1.20.0040.00417.86
8.1.10.0000.00917.66
8.1.00.0000.00817.64
8.0.300.0000.00818.84
8.0.290.0040.00416.88
8.0.280.0030.00318.41
8.0.270.0070.00017.19
8.0.260.0000.00618.38
8.0.250.0030.00317.09
8.0.240.0040.00417.01
8.0.230.0000.00717.05
8.0.220.0000.00817.05
8.0.210.0040.00416.93
8.0.200.0000.00717.01
8.0.190.0080.00016.99
8.0.180.0030.00517.09
8.0.170.0030.00617.04
8.0.160.0030.00316.96
8.0.150.0040.00416.87
8.0.140.0000.00717.04
8.0.130.0100.00013.41
8.0.120.0000.00816.99
8.0.110.0030.00616.88
8.0.100.0050.00216.85
8.0.90.0050.00216.91
8.0.80.0130.00717.03
8.0.70.0040.00416.91
8.0.60.0040.00417.10
8.0.50.0040.00416.94
8.0.30.0130.00417.40
8.0.20.0080.01217.40
8.0.10.0040.00417.04
8.0.00.0110.00616.81
7.4.330.0000.00516.67
7.4.320.0060.00016.86
7.4.300.0030.00316.73
7.4.290.0000.00716.71
7.4.280.0000.00816.78
7.4.270.0020.00516.64
7.4.260.0000.00716.71
7.4.250.0070.00016.76
7.4.240.0000.00816.73
7.4.230.0000.00716.77
7.4.220.0030.00616.55
7.4.210.0100.00816.76
7.4.200.0040.00416.56
7.4.160.0080.00916.77
7.4.140.0100.01017.86
7.4.130.0120.00616.53
7.4.120.0120.00916.70
7.4.110.0100.01316.60
7.4.100.0030.01716.75
7.4.90.0030.01616.83
7.4.80.0130.00319.39
7.4.70.0090.01516.70
7.4.60.0090.01016.77
7.4.50.0060.00916.53
7.4.40.0060.01216.60
7.4.00.0030.00614.80
7.3.330.0050.00013.25
7.3.320.0050.00013.27
7.3.310.0050.00316.42
7.3.300.0070.00016.50
7.3.290.0000.00716.31
7.3.280.0070.01016.53
7.3.260.0100.00716.64
7.3.240.0100.00916.68
7.3.230.0170.00716.67
7.3.210.0140.00916.75
7.3.200.0050.01116.90
7.3.190.0080.01116.58
7.3.180.0060.00916.73
7.3.170.0090.01416.77
7.3.160.0130.00316.55
7.3.00.4350.00315.04
7.2.330.0070.01116.88
7.2.320.0080.01116.71
7.2.310.0090.00816.82
7.2.300.0140.00916.59
7.2.290.0060.01016.85
7.2.130.6560.00715.20
7.2.120.5290.01015.18
7.2.110.5570.00714.89
7.2.100.4780.00715.02
7.2.90.7060.01314.92
7.2.80.4620.00315.28
7.2.70.5660.01015.06
7.2.60.5860.01015.14
7.2.50.4410.00315.43
7.2.40.3820.00915.35
7.2.30.4170.00315.25
7.2.20.1510.01015.11
7.2.10.0430.00414.88
7.2.00.0100.01015.02
7.1.250.5550.00713.95
7.0.330.6710.00313.80
5.6.380.0180.00014.40

preferences:
200.55 ms | 403 KiB | 5 Q