3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "I went to the dog park yesterday and saw @dog4 playing with @dog8 and @dog3 drinking water -- poor @dog33."; $lookup = [ 'dog4' => 4, 'dog8' => 8, 'dog3' => 3, ]; echo preg_replace_callback( '/@(\w+)/', function ($m) use($lookup) { return isset($lookup[$m[1]]) ? "<span onclick='openPage(\"dogs.php?id={$lookup[$m[1]]}\")' role='link' tabindex='0'>{$m[0]}</span>" : $m[0]; }, $text );

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.140.0110.01117.64
8.4.130.0110.00918.15
8.4.120.0130.00724.00
8.4.110.0050.00522.54
8.4.100.0050.00618.88
8.4.90.0130.00718.99
8.4.80.0080.01118.61
8.4.70.0150.00618.13
8.4.60.0080.01218.89
8.4.50.0070.01218.05
8.4.40.0070.01017.84
8.4.30.0140.00720.31
8.4.20.0100.01018.05
8.4.10.0060.00317.68
8.3.270.0110.00916.65
8.3.260.0130.00616.85
8.3.250.0100.00818.82
8.3.240.0130.00619.01
8.3.230.0120.00816.65
8.3.220.0100.00619.08
8.3.210.0040.00316.98
8.3.200.0070.00216.75
8.3.190.0070.00217.02
8.3.180.0070.00416.84
8.3.170.0150.00320.59
8.3.160.0080.00016.80
8.3.150.0100.01019.02
8.3.140.0090.00616.67
8.3.130.0060.00318.49
8.3.120.0100.01018.86
8.3.110.0070.00320.94
8.3.100.0060.00317.04
8.3.90.0050.00326.77
8.3.80.0050.00519.36
8.3.70.0000.01616.75
8.3.60.0090.00616.88
8.3.50.0140.00316.78
8.3.40.0110.00419.04
8.3.30.0040.01118.91
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0100.00920.61
8.2.280.0080.00618.92
8.2.270.0130.00617.42
8.2.260.0030.00518.36
8.2.250.0060.01017.03
8.2.240.0130.00317.06
8.2.230.0030.00622.58
8.2.220.0050.00524.06
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0040.01118.30
8.2.180.0070.01325.92
8.2.170.0070.01419.21
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0020.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00826.35
8.2.110.0090.00922.20
8.2.100.0120.00018.02
8.2.90.0000.00818.22
8.2.80.0040.01118.84
8.2.70.0030.00617.88
8.2.60.0040.00418.05
8.2.50.0090.00018.07
8.2.40.0060.00318.34
8.2.30.0070.00018.06
8.2.20.0040.00418.10
8.2.10.0040.00419.46
8.2.00.0070.00019.35
8.1.330.0110.00722.09
8.1.320.0100.00916.45
8.1.310.0140.00318.32
8.1.300.0090.00920.33
8.1.290.0030.00630.84
8.1.280.0100.01325.92
8.1.270.0130.00323.85
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0080.00323.97
8.1.230.0070.00420.97
8.1.220.0040.00417.74
8.1.210.0000.00818.83
8.1.200.0030.00617.36
8.1.190.0030.00517.47
8.1.180.0060.00318.10
8.1.170.0000.00818.68
8.1.160.0040.00418.86
8.1.150.0030.00518.98
8.1.140.0000.00719.00
8.1.130.0040.00420.17
8.1.120.0070.00017.57
8.1.110.0000.00717.64
8.1.100.0040.00417.57
8.1.90.0070.00017.56
8.1.80.0060.00317.55
8.1.70.0000.00717.60
8.1.60.0050.00317.67
8.1.50.0030.00617.73
8.1.40.0040.00717.58
8.1.30.0060.00317.87
8.1.20.0000.00817.84
8.1.10.0000.01017.68
8.1.00.0040.00417.54
8.0.300.0060.00320.34
8.0.290.0030.00616.75
8.0.280.0000.00718.52
8.0.270.0030.00318.17
8.0.260.0030.00318.59
8.0.250.0030.00317.09
8.0.240.0040.00417.15
8.0.230.0000.00717.14
8.0.220.0030.00517.06
8.0.210.0000.00716.95
8.0.200.0060.00317.05
8.0.190.0000.00717.18
8.0.180.0040.00417.05
8.0.170.0060.00317.15
8.0.160.0000.00817.01
8.0.150.0080.00017.07
8.0.140.0000.00717.03
8.0.130.0060.00013.42
8.0.120.0060.00316.93
8.0.110.0000.00717.04
8.0.100.0040.00416.89
8.0.90.0070.00017.07
8.0.80.0130.00616.98
8.0.70.0040.00417.12
8.0.60.0070.00017.05
8.0.50.0050.00317.12
8.0.30.0100.01417.09
8.0.20.0150.01017.07
8.0.10.0140.00717.17
8.0.00.0080.00817.18
7.4.330.0020.00315.55
7.4.320.0040.00416.81
7.4.300.0000.00716.82
7.4.290.0070.00016.73
7.4.280.0030.00516.84
7.4.270.0030.00616.74
7.4.260.0050.00013.50
7.4.250.0000.00716.80
7.4.240.0040.00416.59
7.4.230.0030.00316.65
7.4.220.0010.00616.76
7.4.210.0060.00916.76
7.4.200.0040.00416.89
7.4.160.0060.01216.77
7.4.150.0110.01416.84
7.4.140.0170.00816.86
7.4.130.0040.01216.70
7.4.120.0110.00716.70
7.4.110.0150.00716.78
7.4.100.0060.01216.83
7.4.90.0150.01216.77
7.4.80.0220.00316.78
7.4.70.0170.01016.81
7.4.60.0030.01816.87
7.4.50.0080.00816.64
7.4.40.0090.00916.61
7.4.30.0000.01816.86
7.4.20.0090.01316.73
7.4.10.0090.00616.90
7.4.00.0080.00816.66
7.3.330.0000.00716.42
7.3.320.0000.00513.51
7.3.310.0000.00716.41
7.3.300.0040.00416.54
7.3.290.0100.00716.49
7.3.270.0110.01116.54
7.3.260.0120.00416.47
7.3.250.0070.01516.43
7.3.240.0170.00616.46
7.3.230.0030.01816.48
7.3.220.0160.00316.34
7.3.210.0140.00916.41
7.3.200.0150.00616.52
7.3.190.0110.01116.48
7.3.180.0070.01516.51
7.3.170.0090.00616.41
7.3.160.0120.00416.48
7.3.150.0080.01516.41
7.3.140.0040.01216.40
7.3.130.0060.01016.45
7.3.120.0140.00316.39
7.3.110.0130.00316.41
7.3.100.0200.00316.38
7.3.90.0090.00616.75
7.3.80.0070.01016.37
7.3.70.0080.00816.63
7.3.60.0130.01016.62
7.3.50.0110.00516.62
7.3.40.0100.00616.66
7.3.30.0070.01016.60
7.3.20.0030.01416.70
7.3.10.0060.01216.57
7.3.00.0100.00716.57

preferences:
80.7 ms | 403 KiB | 5 Q