3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userdb = array( array( 'uid' => '100', 'name' => 'Sandra Shush', 'pic_square' => 'abc.jpg' ), array( 'uid' => '5465', 'name' => 'Stefanie Mcmohn', 'pic_square' => 'Michael.jpg' ), array( 'uid' => '40489', 'name' => 'Michael', 'pic_square' => 'xyz.jpg' ) ); $search = "Michael"; Foreach($userdb as $key => $arr){ If(preg_grep("/" . $search ."/", $arr)){ $res[] = $userdb[$key]; } } Var_dump($res);

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.120.0090.01024.06
8.4.110.0090.01222.51
8.4.100.0110.01018.80
8.4.90.0170.00518.70
8.4.80.0080.00818.81
8.4.70.0050.00317.95
8.4.60.0150.00718.86
8.4.50.0100.01020.59
8.4.40.0060.00318.05
8.4.30.0070.01419.40
8.4.20.0060.01017.98
8.4.10.0030.00618.13
8.3.250.0140.00518.93
8.3.240.0130.00617.43
8.3.230.0120.00716.70
8.3.220.0120.00619.00
8.3.210.0070.01116.72
8.3.200.0060.00316.74
8.3.190.0110.00717.30
8.3.180.0120.00616.91
8.3.170.0100.00721.04
8.3.160.0060.00317.26
8.3.150.0030.00520.63
8.3.140.0000.00818.36
8.3.130.0040.00418.40
8.3.120.0070.01520.77
8.3.110.0040.00416.76
8.3.100.0060.00318.51
8.3.90.0090.00026.77
8.3.80.0030.00619.36
8.3.70.0040.01216.88
8.3.60.0150.00018.43
8.3.50.0080.00618.42
8.3.40.0120.00418.92
8.3.30.0090.00619.09
8.3.20.0000.00821.76
8.3.10.0040.00421.85
8.3.00.0000.00823.48
8.2.290.0110.00820.84
8.2.280.0130.00718.59
8.2.270.0110.00717.19
8.2.260.0040.00418.93
8.2.250.0030.00618.73
8.2.240.0040.00417.42
8.2.230.0030.00620.94
8.2.220.0130.00324.06
8.2.210.0110.00726.77
8.2.200.0090.00018.88
8.2.190.0000.01516.63
8.2.180.0170.00316.75
8.2.170.0040.01119.13
8.2.160.0100.00322.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.18
8.2.120.0040.00426.35
8.2.110.0030.00721.12
8.2.100.0090.00317.97
8.2.90.0030.00618.22
8.2.80.0060.00320.48
8.2.70.0030.00518.04
8.2.60.0080.00018.22
8.2.50.0060.00318.10
8.2.40.0040.00419.17
8.2.30.0040.00421.14
8.2.20.0000.00818.20
8.2.10.0000.00818.20
8.2.00.0060.00318.08
8.1.330.0110.00821.76
8.1.320.0140.00616.45
8.1.310.0060.00916.67
8.1.300.0160.00318.30
8.1.290.0030.00630.84
8.1.280.0070.01525.92
8.1.270.0050.00523.79
8.1.260.0080.00026.35
8.1.250.0090.00028.09
8.1.240.0060.00322.02
8.1.230.0040.00720.97
8.1.220.0000.00817.74
8.1.210.0040.00418.98
8.1.200.0040.00417.35
8.1.190.0080.00017.35
8.1.180.0030.00618.10
8.1.170.0000.00818.71
8.1.160.0070.00018.93
8.1.150.0070.00020.86
8.1.140.0080.00017.60
8.1.130.0070.00519.02
8.1.120.0040.00417.62
8.1.110.0040.00417.59
8.1.100.0000.00717.56
8.1.90.0070.00017.64
8.1.80.0080.00317.61
8.1.70.0070.00317.54
8.1.60.0000.00917.76
8.1.50.0050.00317.54
8.1.40.0040.00417.65
8.1.30.0040.00417.81
8.1.20.0040.00417.82
8.1.10.0060.00317.68
8.1.00.0050.00317.64
8.0.300.0040.00420.16
8.0.290.0050.00516.75
8.0.280.0050.00218.49
8.0.270.0070.00017.23
8.0.260.0000.00717.20
8.0.250.0000.00717.06
8.0.240.0060.00317.12
8.0.230.0080.00017.16
8.0.220.0000.00716.93
8.0.210.0000.00716.94
8.0.200.0030.00317.11
8.0.190.0030.00517.09
8.0.180.0040.00416.99
8.0.170.0040.00417.08
8.0.160.0070.00017.09
8.0.150.0070.00016.88
8.0.140.0050.00216.98
8.0.130.0000.00713.48
8.0.120.0070.00017.03
8.0.110.0030.00616.91
8.0.100.0040.00416.97
8.0.90.0070.00017.10
8.0.80.0080.01317.09
8.0.70.0080.00016.93
8.0.60.0000.00717.03
8.0.50.0050.00217.07
8.0.30.0130.00717.35
8.0.20.0130.00617.40
8.0.10.0070.00016.98
8.0.00.0160.00516.92
7.4.330.0040.00015.55
7.4.320.0030.00316.72
7.4.300.0030.00316.71
7.4.290.0000.00716.60
7.4.280.0030.00516.71
7.4.270.0030.00316.82
7.4.260.0080.00316.59
7.4.250.0000.00716.79
7.4.240.0000.00716.71
7.4.230.0000.00716.71
7.4.220.0030.00516.62
7.4.210.0080.00816.71
7.4.200.0070.00016.69
7.4.160.0070.01016.69
7.4.140.0130.01117.86
7.4.130.0140.00416.63
7.4.120.0090.00916.74
7.4.110.0120.00616.65
7.4.100.0080.00916.66
7.4.90.0150.00416.72
7.4.80.0140.01019.39
7.4.70.0060.01216.75
7.4.60.0060.01016.72
7.4.50.0100.00616.62
7.4.40.0100.01016.90
7.4.10.0000.01815.04
7.4.00.0050.01215.12
7.3.330.0050.00013.35
7.3.320.0050.00013.15
7.3.310.0000.00716.43
7.3.300.0040.00416.41
7.3.290.0030.00316.40
7.3.280.0090.00816.44
7.3.260.0100.01016.54
7.3.240.0050.01216.62
7.3.230.0110.00716.79
7.3.210.0090.00916.39
7.3.200.0100.01016.75
7.3.190.0130.00616.42
7.3.180.0060.01016.53
7.3.170.0090.00616.69
7.3.160.0080.00816.51
7.3.130.0060.01214.73
7.3.120.0020.01415.04
7.3.110.0050.01214.98
7.3.100.0050.01015.21
7.3.90.0030.01014.99
7.3.80.0050.01014.92
7.3.70.0040.00714.98
7.3.60.0050.00815.00
7.3.50.0070.00814.95
7.3.40.0060.00514.93
7.3.30.0050.01315.04
7.3.20.0070.01116.62
7.3.10.0050.00716.65
7.3.00.0140.00316.97
7.2.330.0170.00816.89
7.2.320.0210.00616.73
7.2.310.0060.01616.84
7.2.300.0080.00916.94
7.2.290.0140.00316.80
7.2.260.0060.00515.27
7.2.250.0030.01415.22
7.2.240.0020.01115.36
7.2.230.0040.01015.22
7.2.220.0080.00515.13
7.2.210.0050.01115.29
7.2.200.0050.01015.08
7.2.190.0090.00515.14
7.2.180.0060.00715.24
7.2.170.0000.01515.25
7.2.160.0040.01415.18
7.2.150.0070.00917.02
7.2.140.0100.00517.19
7.2.130.0080.00916.88
7.2.120.0050.01216.97
7.2.110.0060.00617.16
7.2.100.0050.00817.13
7.2.90.0090.00617.15
7.2.80.0080.00817.16
7.2.70.0120.00417.05
7.2.60.0110.00617.01
7.2.50.0070.01017.13
7.2.40.0290.00817.38
7.2.30.0190.01117.33
7.2.20.0170.00817.46
7.2.10.0220.01017.20
7.2.00.0220.00717.46
7.1.330.0040.01216.12
7.1.320.0040.00715.99
7.1.310.0040.00716.01
7.1.300.0050.00915.89
7.1.290.0100.00216.02
7.1.280.0080.00615.91
7.1.270.0100.00616.04
7.1.260.0080.00616.06
7.1.250.0090.00615.91
7.1.240.0120.00215.97
7.1.230.0080.00515.91
7.1.220.0060.00815.87
7.1.210.0130.00316.02
7.1.200.0060.01216.01
7.1.190.0100.00515.91
7.1.180.0130.00216.05
7.1.170.0050.01015.91
7.1.160.0230.00716.29
7.1.150.0300.00716.28
7.1.140.0280.00816.34
7.1.130.0220.00916.46
7.1.120.0290.00916.37
7.1.110.0230.00816.26
7.1.100.0210.00916.17
7.1.90.0220.00816.24
7.1.80.0090.00916.17
7.1.70.0310.00815.68
7.1.60.0100.01121.71
7.1.50.0130.00621.70
7.1.40.0360.01021.58
7.1.30.0150.01121.59
7.1.20.0140.01221.55
7.1.10.0090.00815.58
7.1.00.0220.00715.72
7.0.330.0070.00815.45
7.0.320.0120.00315.55
7.0.310.0110.00415.32
7.0.300.0000.01215.62
7.0.290.0070.01015.52
7.0.280.0080.00415.47
7.0.270.0070.00415.44
7.0.260.0000.01515.49
7.0.250.0030.00515.66
7.0.240.0000.01215.75
7.0.230.0030.00615.45
7.0.220.0060.01015.62
7.0.210.0040.01115.51
7.0.200.0040.00415.69
7.0.190.0030.00715.53
7.0.180.0100.00715.39
7.0.170.0130.00315.53
7.0.160.0070.00715.72
7.0.150.0080.00615.50
7.0.140.0030.00615.82
7.0.130.0030.00615.70
7.0.120.0040.00815.70
7.0.110.0000.01315.66
7.0.100.0060.00315.79
7.0.90.0060.00315.69
7.0.80.0100.00315.86
7.0.70.0090.00015.69
7.0.60.0000.01515.82
7.0.50.0030.01015.85
7.0.40.0030.01013.88
7.0.30.0080.00013.71
7.0.20.0040.00413.70
7.0.10.0060.00313.75
7.0.00.0030.00713.43
5.6.400.0050.00314.97
5.6.390.0040.01514.55
5.6.380.0080.00614.39
5.6.370.0070.01114.37
5.6.360.0030.01414.38
5.6.350.0060.00914.55
5.6.340.0030.01014.51
5.6.330.0000.01514.80
5.6.320.0000.00814.80
5.6.310.0130.00314.27
5.6.300.0080.00814.61
5.6.290.0030.01014.41
5.6.280.0110.00014.64
5.6.270.0070.00714.39
5.6.260.0060.01214.57
5.6.250.0070.00414.41
5.6.240.0060.00314.39
5.6.230.0060.00614.56
5.6.220.0000.00914.35
5.6.210.0000.01514.48
5.6.200.0120.00014.41
5.6.190.0070.00714.75
5.6.180.0000.01014.32
5.6.170.0030.00614.44
5.6.160.0060.00314.42
5.6.150.0040.01214.46
5.6.140.0070.00714.59
5.6.130.0000.00914.36
5.6.120.0000.00914.47
5.6.110.0000.01014.56
5.6.100.0060.00314.56
5.6.90.0000.01314.22
5.6.80.0000.01314.42
5.6.70.0040.01214.31
5.6.60.0000.01114.39
5.6.50.0030.01014.13
5.6.40.0000.00814.43
5.6.30.0000.01214.27
5.6.20.0100.00314.70
5.6.10.0070.00714.44
5.6.00.0030.01314.39

preferences:
29.79 ms | 403 KiB | 5 Q