3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_video_block($id) { return "***replacement text for $id***"; } function display_video($text) { return preg_replace_callback( '/\[VIDEO ID=(\d+)]/', function($m) { return get_video_block($m[1]); }, $text ); } echo display_video("Here is a video [VIDEO ID=33] to watch");

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.20.0120.00818.88
8.4.10.0100.00617.74
8.3.150.0130.00616.75
8.3.140.0000.00717.04
8.3.130.0000.00816.90
8.3.120.0060.00920.76
8.3.110.0090.00018.29
8.3.100.0030.00516.77
8.3.90.0060.01326.77
8.3.80.0000.00919.36
8.3.70.0040.01916.88
8.3.60.0090.00618.25
8.3.50.0170.00318.27
8.3.40.0140.00018.90
8.3.30.0120.00318.75
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.270.0040.01417.40
8.2.260.0070.01118.23
8.2.250.0050.00318.63
8.2.240.0040.00718.87
8.2.230.0030.00622.58
8.2.220.0080.00024.06
8.2.210.0100.00726.77
8.2.200.0090.00018.88
8.2.190.0070.01016.63
8.2.180.0100.00325.92
8.2.170.0110.00422.96
8.2.160.0100.00322.96
8.2.150.0090.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0050.00226.35
8.2.110.0030.00621.17
8.2.100.0070.00418.03
8.2.90.0000.00918.09
8.2.80.0030.00617.97
8.2.70.0030.00517.75
8.2.60.0040.00417.93
8.2.50.0030.00518.05
8.2.40.0000.00820.19
8.2.30.0070.00018.17
8.2.20.0070.00018.06
8.2.10.0030.00619.35
8.2.00.0000.00819.26
8.1.310.0100.00718.62
8.1.300.0130.00317.84
8.1.290.0060.00330.84
8.1.280.0140.00025.92
8.1.270.0050.00323.99
8.1.260.0030.00528.09
8.1.250.0000.00828.09
8.1.240.0120.00022.10
8.1.230.0070.00720.97
8.1.220.0040.00417.74
8.1.210.0000.00818.84
8.1.200.0060.00317.38
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0080.00018.59
8.1.160.0040.00419.05
8.1.150.0040.00418.91
8.1.140.0000.00718.91
8.1.130.0030.00320.09
8.1.120.0040.00417.49
8.1.110.0030.00617.56
8.1.100.0090.00417.48
8.1.90.0080.00317.48
8.1.80.0120.00217.46
8.1.70.0080.00317.54
8.1.60.0090.00417.55
8.1.50.0100.00417.63
8.1.40.0050.00417.57
8.1.30.0030.00717.71
8.1.20.0060.00717.69
8.1.10.0100.00417.68
8.1.00.0040.00617.56
8.0.300.0000.00819.99
8.0.290.0040.00416.88
8.0.280.0040.00418.37
8.0.270.0030.00318.01
8.0.260.0030.00318.34
8.0.250.0000.00816.98
8.0.240.0000.01117.01
8.0.230.0040.00616.97
8.0.220.0080.00416.87
8.0.210.0040.00516.90
8.0.200.0060.00417.05
8.0.190.0070.00316.98
8.0.180.0060.00416.93
8.0.170.0080.00316.92
8.0.160.0060.00516.97
8.0.150.0070.00416.91
8.0.140.0070.00216.81
8.0.130.0050.00315.10
8.0.120.0060.00516.90
8.0.110.0060.00616.92
8.0.100.0100.00116.97
8.0.90.0050.00716.88
8.0.80.0090.00616.92
8.0.70.0030.00916.96
8.0.60.0070.00317.03
8.0.50.0040.00616.91
8.0.30.0140.01316.93
8.0.20.0150.01116.97
8.0.10.0110.01016.99
8.0.00.0180.00617.13
7.4.330.0000.00516.79
7.4.320.0060.00316.68
7.4.300.0070.00416.56
7.4.290.0050.00716.62
7.4.280.0040.00916.64
7.4.270.0060.00716.73
7.4.260.0090.00215.08
7.4.250.0030.00516.68
7.4.240.0050.00416.70
7.4.230.0060.00316.53
7.4.220.0060.00216.63
7.4.210.0090.00616.66
7.4.200.0110.00016.54
7.4.190.0100.00516.78
7.4.180.0140.00016.79
7.4.160.0220.00316.73
7.4.150.0180.00716.68
7.4.140.0110.01016.68
7.4.130.0170.00516.46
7.4.120.0190.00516.63
7.4.110.0090.01216.64
7.4.100.0200.00116.70
7.4.90.0200.00416.64
7.4.80.0130.01116.62
7.4.70.0140.00716.70
7.4.60.0180.00616.70
7.4.50.0100.01316.62
7.4.40.0170.00516.59
7.4.30.0130.01016.54
7.4.20.0110.01216.47
7.4.10.0180.00516.58
7.4.00.0070.01116.66
7.3.330.0050.00516.38
7.3.320.0080.00314.93
7.3.310.0080.00416.43
7.3.300.0090.00316.38
7.3.290.0080.00816.41
7.3.280.0100.00516.49
7.3.270.0110.01416.48
7.3.260.0180.00616.48
7.3.250.0180.00816.48
7.3.240.0150.00716.49
7.3.230.0210.00416.45
7.3.220.0200.00616.43
7.3.210.0190.00816.52
7.3.200.0190.00516.34
7.3.190.0220.00216.47
7.3.180.0190.00516.39
7.3.170.0200.00616.53
7.3.160.0180.00716.40
7.3.150.0150.01116.43
7.3.140.0150.00716.40
7.3.130.0210.00416.39
7.3.120.0160.00816.34
7.3.110.0200.00416.30
7.3.100.0210.00416.26
7.3.90.0130.01016.73
7.3.80.0140.01016.49
7.3.70.0180.00316.49
7.3.60.0160.00616.59
7.3.50.0160.01016.63
7.3.40.0090.01216.64
7.3.30.0170.00516.53
7.3.20.0100.01117.54
7.3.10.0200.00417.54
7.3.00.0110.01217.41

preferences:
28.61 ms | 402 KiB | 5 Q